0000
  #   ˆl–Ü4ý( ©³( 	Å€fàD¦-ÿÃ„i÷žgÀÆ ?÷     # SPDX-License-Identifier: GPL-2.0-only
#
# GPIO infrastructure and drivers
#

menuconfig GPIOLIB
	bool "GPIO Support"
	help
	  This enables GPIO support through the generic GPIO library.
	  You only need to enable this if you also want to enable
	  one or more of the GPIO drivers below.

	  If unsure, say N.

if GPIOLIB

config GPIOLIB_FASTPATH_LIMIT
	int "Maximum number of GPIOs for fast path"
	range 32 512
	default 512
	help
	  This adjusts the point at which certain APIs will switch from
	  using a stack allocated buffer to a dynamically allocated buffer.

	  You shouldn't need to change this unless you really need to
	  optimize either stack space or performance. Change this carefully
	  since setting an incorrect value could cause stack corruption.

config OF_GPIO
	def_bool y
	depends on OF
	depends on HAS_IOMEM

config GPIO_ACPI
	def_bool y
	depends on ACPI

config GPIOLIB_IRQCHIP
	select IRQ_DOMAIN
	bool

config OF_GPIO_MM_GPIOCHIP
	bool
	help
	  This adds support for the legacy 'struct of_mm_gpio_chip' interface
	  from PowerPC. Existing drivers using this interface need to select
	  this symbol, but new drivers should use the generic gpio-regmap
	  infrastructure instead.

config DEBUG_GPIO
	bool "Debug GPIO calls"
	depends on DEBUG_KERNEL
	help
	  Say Y here to add some extra checks and diagnostics to GPIO calls.
	  These checks help ensure that GPIOs have been properly initialized
	  before they are used, and that sleeping calls are not made from
	  non-sleeping contexts.  They can make bitbanged serial protocols
	  slower.  The diagnostics help catch the type of setup errors
	  that are most common when setting up new platforms or boards.

config GPIO_SYSFS
	bool "/sys/class/gpio/... (sysfs interface)" if EXPERT
	depends on SYSFS
	select GPIO_CDEV # We need to encourage the new ABI
	help
	  Say Y here to add the legacy sysfs interface for GPIOs.

	  This ABI is deprecated. If you want to use GPIO from userspace,
	  use the character device /dev/gpiochipN with the appropriate
	  ioctl() operations instead.

config GPIO_CDEV
	bool
	prompt "Character device (/dev/gpiochipN) support" if EXPERT
	default y
	help
	  Say Y here to add the character device /dev/gpiochipN interface
	  for GPIOs. The character device allows userspace to control GPIOs
	  using ioctl() operations.

	  Only say N if you are sure that the GPIO character device is not
	  required.

	  If unsure, say Y.

config GPIO_CDEV_V1
	bool "Support GPIO ABI Version 1"
	default y
	depends on GPIO_CDEV
	help
	  Say Y here to support version 1 of the GPIO CDEV ABI.

	  This ABI version is deprecated.
	  Please use the latest ABI for new developments.

	  If unsure, say Y.

config GPIO_GENERIC
	depends on HAS_IOMEM # Only for IOMEM drivers
	tristate

config GPIO_REGMAP
	select REGMAP
	tristate

# put drivers in the right section, in alphabetical order

# This symbol is selected by both I2C and SPI expanders
config GPIO_MAX730X
	tristate

menu "Memory mapped GPIO drivers"
	depends on HAS_IOMEM

config GPIO_74XX_MMIO
	tristate "GPIO driver for 74xx-ICs with MMIO access"
	depends on OF_GPIO
	select GPIO_GENERIC
	help
	  Say yes here to support GPIO functionality for 74xx-compatible ICs
	  with MMIO access. Compatible models include:
	    1 bit:	741G125 (Input), 741G74 (Output)
	    2 bits:	742G125 (Input), 7474 (Output)
	    4 bits:	74125 (Input), 74175 (Output)
	    6 bits:	74365 (Input), 74174 (Output)
	    8 bits:	74244 (Input), 74273 (Output)
	    16 bits:	741624 (Input), 7416374 (Output)

config GPIO_ALTERA
	tristate "Altera GPIO"
	depends on OF_GPIO
	select GPIOLIB_IRQCHIP
	select OF_GPIO_MM_GPIOCHIP
	help
	  Say Y or M here to build support for the Altera PIO device.

	  If driver is built as a module it will be called gpio-altera.

config GPIO_AMDPT
	tristate "AMD Promontory GPIO support"
	depends on ACPI
	select GPIO_GENERIC
	help
	  Driver for GPIO functionality on Promontory IOHub.
	  Requires ACPI ASL code to enumerate as a platform device.

config GPIO_ASPEED
	tristate "Aspeed GPIO suppor