mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
gpiolib: add drivers/gpio directory
Add an empty drivers/gpio directory for gpiolib infrastructure and GPIO expanders. It will be populated by later patches. This won't be the only place to hold such gpio_chip code. Many external chips add a few GPIOs as secondary functionality (such as MFD drivers) and platform code frequently needs to closely integrate GPIO and IRQ support. This is placed *early* in the build/link sequence since it's common for other drivers to depend on GPIOs to do their work, so they must be initialized early in the device_initcall() sequence. Signed-off-by: David Brownell <[email protected]> Acked-by: Jean Delvare <[email protected]> Cc: Eric Miao <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: Russell King <[email protected]> Cc: Ben Gardner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
99c84dbdc7
commit
a9c5fff542
5 changed files with 41 additions and 0 deletions
32
drivers/gpio/Kconfig
Normal file
32
drivers/gpio/Kconfig
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# GPIO infrastructure and expanders
|
||||
#
|
||||
|
||||
config HAVE_GPIO_LIB
|
||||
bool
|
||||
help
|
||||
Platforms select gpiolib if they use this infrastructure
|
||||
for all their GPIOs, usually starting with ones integrated
|
||||
into SOC processors.
|
||||
|
||||
menu "GPIO Support"
|
||||
depends on HAVE_GPIO_LIB
|
||||
|
||||
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.
|
||||
The checks help ensure that GPIOs have been properly initialized
|
||||
before they are used and that sleeping calls aren not made from
|
||||
nonsleeping 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.
|
||||
|
||||
# put expanders in the right section, in alphabetical order
|
||||
|
||||
comment "I2C GPIO expanders:"
|
||||
|
||||
comment "SPI GPIO expanders:"
|
||||
|
||||
endmenu
|
||||
4
drivers/gpio/Makefile
Normal file
4
drivers/gpio/Makefile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# gpio support: dedicated expander chips, etc
|
||||
|
||||
ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG
|
||||
|
||||
Loading…
Reference in a new issue