menu "Android"

config ANDROID
	bool "Android Drivers"
	---help---
	  Enable support for various drivers needed on the Android platform

if ANDROID

config ANDROID_BINDER_IPC
	bool "Android Binder IPC Driver"
	depends on MMU
	default n
	---help---
	  Binder is used in Android for both communication between processes,
	  and remote method invocation.

	  This means one Android process can call a method/routine in another
	  Android process, using Binder to identify, invoke and pass arguments
	  between said processes.

config ANDROID_BINDER_IPC_32BIT
	bool
	depends on !64BIT && ANDROID_BINDER_IPC
	default y
	---help---
	  The Binder API has been changed to support both 32 and 64bit
	  applications in a mixed environment.

	  Enable this to support an old 32-bit Android user-space (v4.4 and
	  earlier).

	  Note that enabling this will break newer Android user-space.

config ANDROID_BINDER_DEVICES
	string "Android Binder devices"
	depends on ANDROID_BINDER_IPC
	default "binder,hwbinder,vndbinder"
	---help---
	  Default value for the binder.devices parameter.

	  The binder.devices parameter is a comma-separated list of strings
	  that specifies the names of the binder device nodes that will be
	  created. Each binder device has its own context manager, and is
	  therefore logically separated from the other devices.

config ANDROID_BINDER_IPC_SELFTEST
        bool "Android Binder IPC Driver Selftest"
        depends on ANDROID_BINDER_IPC
        ---help---
          This feature allows binder selftest to run.

          Binder selftest checks the allocation and free of binder buffers
          exhaustively with combinations of various buffer sizes and
          alignments.

config SEC_TRACE_BINDERCNT
	bool "Trace process binder count"
	default n
	---help---
	  This feature can be used to monitor binder transactions count to
	  a designated process.

config ASHMEM
	bool "Enable the Anonymous Shared Memory Subsystem"
	default n
	depends on SHMEM
	---help---
	  The ashmem subsystem is a new shared memory allocator, similar to
	  POSIX SHM but with different behavior and sporting a simpler
	  file-based API.

	  It is, in theory, a good memory allocator for low-memory devices,
	  because it can discard shared memory units when under memory pressure.

config ANDROID_LOGGER
	tristate "Android log driver"
	default n
	---help---
	  This adds support for system-wide logging using four log buffers.

	  These are:

	      1: main
	      2: events
	      3: radio
	      4: system

	  Log reading and writing is performed via normal Linux reads and
	  optimized writes. This optimization avoids logging having too
	  much overhead in the system.

config ANDROID_TIMED_OUTPUT
	bool "Timed output class driver"
	default y

config ANDROID_TIMED_GPIO
	tristate "Android timed gpio driver"
	depends on GPIOLIB && ANDROID_TIMED_OUTPUT
	default n

config ANDROID_LOW_MEMORY_KILLER
	bool "Android Low Memory Killer"
	---help---
	  Registers processes to be killed when memory is low

config ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES
	bool "Android Low Memory Killer: detect oom_adj values"
	depends on ANDROID_LOW_MEMORY_KILLER
	default y
	---help---
	  Detect oom_adj values written to
	  /sys/module/lowmemorykiller/parameters/adj and convert them
	  to oom_score_adj values.

config SEC_TIMEOUT_LOW_MEMORY_KILLER
	bool "Android timeout Low Memory Killer"
	default n
	help
	 This enables 'Android-Style oom-killer'
	 The way to select victim by oom-killer provided by
	 linux kernel is totally different from android policy.
	 Hence, it makes more sense that we select the oom victim
	 as android does when LMK is invoked.

config SEC_DEBUG_LMK_MEMINFO
	bool "Show Meminfo when lmk invoked"
	default n
	help
	  Show memory information when lmk kills process

config SEC_DEBUG_LMK_COUNT_INFO
	bool "Record LMK execution count"
	default n
	help
	  Show LMK execution count information when lmk invoked

config ANDROID_INTF_ALARM_DEV
	bool "Android alarm driver"
	depends on RTC_CLASS
	default n
	---help---
	  Provides non-wakeup and rtc backed wakeup alarms based on rtc or
	  elapsed realtime, and a non-wakeup alarm on the monotonic clock.
	  Also exports the alarm interface to user-space.

config SYNC
	bool "Synchronization framework"
	default n
	select ANON_INODES
	---help---
	  This option enables the framework for synchronization between multiple
	  drivers.  Sync implementations can take advantage of hardware
	  synchronization built into devices like GPUs.

config SW_SYNC
	bool "Software synchronization objects"
	default n
	depends on SYNC
	---help---
	  A sync object driver that uses a 32bit counter to coordinate
	  syncrhronization.  Useful when there is no hardware primitive backing
	  the synchronization.

config SW_SYNC_USER
	bool "Userspace API for SW_SYNC"
	default n
	depends on SW_SYNC
	---help---
	  Provides a user space API to the sw sync object.
	  *WARNING* improper use of this can result in deadlocking kernel
	  drivers from userspace.

config ONESHOT_SYNC
	bool "One shot sync objects"
	depends on SYNC
	help
	  This sync driver provides a way to create sync objects that may
	  be signaled by userspace. Unlike other sync objects, the
	  sync objects created by this driver may be signaled in any order
	  without changing the state of other sync objects on the timeline.

config ONESHOT_SYNC_USER
	bool "Userspace API for ONESHOT_SYNC"
	depends on SYNC
	help
	  Provide a userspace API for creating oneshot sync objects.

config ANDROID_VSOC
	tristate "Android Virtual SoC support"
	default n
	depends on PCI_MSI
	---help---
	  This option adds support for the Virtual SoC driver needed to boot
	  a 'cuttlefish' Android image inside QEmu. The driver interacts with
	  a QEmu ivshmem device. If built as a module, it will be called vsoc.

source "drivers/staging/android/ion/Kconfig"


endif # if ANDROID

endmenu
