mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
e1b2dc70cd
The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt controller, and pinmux/control device. Original driver by Simon Arlott. Rewrite including GPIO chip device by Chris Boot. Upstreaming changes by Stephen Warren: * Wrote DT binding documentation. * Changed brcm,function to an integer to more directly match the datasheet, and to match brcm,pins being an integer. * Implemented pull-up/down pin config. * Removed read-only DT property and related code. The restriction this implemented are driven by the board, not the GPIO HW block, so don't really make sense of a HW block binding, were in general incomplete (since they could only know about the few pins hard-coded into the Raspberry Pi B board design and not the uncommitted GPIOS), and are better represented simply by not writing incorrect data into pin configuration nodes. * Don't set GPIO_IN function select in gpio_request_enable() to avoid glitches; defer this to gpio_set_direction(). Consequently, removed empty bcm2835_pmx_gpio_request_enable(). * Simplified enabled_irq_map[]; make it explicitly 1 entry per bank. * Lifted use of enabled_irq_map[] outside the per-interrupt loop in IRQ handler, thus fixing an issue where the code was indexing into enabled_irq_map[] by intra-bank GPIO ID, not global GPIO ID. * Removed locking in IRQ handler, since all other code uses spin_lock_irqsave() and so guarantees it doesn't run concurrently with the handler. * Moved duplicated BUILD_BUG_ON()s into probe(). Also check size of bcm2835_gpio_pins[]. * Remove range-checking from bcm2835_pctl_get_groups_count() since we've decided to trust the pinctrl core. * Made bcm2835_pmx_gpio_disable_free() call bcm2835_pinctrl_fsel_set() directly for simplicity. * Fixed body of dt_free_map() to match latest dt_node_to_map(). * Removed GPIO ownership check from bcm2835_pmx_enable() since the pinctrl core owns doing this. * Made irq_chip and pinctrl_gpio_range .name == MODULE_NAME so it's more descriptive. * Simplified remove(); removed call to non-existent pinctrl_remove_gpio_range(), remove early return on error. * Don't force gpiochip's base to 0. Set gpio_range.base to gpiochip's base GPIO number. * Error-handling cleanups in probe(). * Switched to module_platform_driver() rather than open-coding. * Made pin, group, and function names lower-case. * s/broadcom/brcm/ in DT property names. * s/2708/2835/. * Fixed a couple minor checkpatch warnings, and other minor cleanup. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Chris Boot <bootc@bootc.net> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
174 lines
3.2 KiB
Plaintext
174 lines
3.2 KiB
Plaintext
#
|
|
# PINCTRL infrastructure and drivers
|
|
#
|
|
|
|
config PINCTRL
|
|
bool
|
|
|
|
if PINCTRL
|
|
|
|
menu "Pin controllers"
|
|
depends on PINCTRL
|
|
|
|
config PINMUX
|
|
bool "Support pin multiplexing controllers"
|
|
|
|
config PINCONF
|
|
bool "Support pin configuration controllers"
|
|
|
|
config GENERIC_PINCONF
|
|
bool
|
|
select PINCONF
|
|
|
|
config DEBUG_PINCTRL
|
|
bool "Debug PINCTRL calls"
|
|
depends on DEBUG_KERNEL
|
|
help
|
|
Say Y here to add some extra checks and diagnostics to PINCTRL calls.
|
|
|
|
config PINCTRL_BCM2835
|
|
bool
|
|
select PINMUX
|
|
select PINCONF
|
|
|
|
config PINCTRL_IMX
|
|
bool
|
|
select PINMUX
|
|
select PINCONF
|
|
|
|
config PINCTRL_IMX35
|
|
bool "IMX35 pinctrl driver"
|
|
depends on OF
|
|
depends on SOC_IMX35
|
|
select PINCTRL_IMX
|
|
help
|
|
Say Y here to enable the imx35 pinctrl driver
|
|
|
|
config PINCTRL_IMX51
|
|
bool "IMX51 pinctrl driver"
|
|
depends on OF
|
|
depends on SOC_IMX51
|
|
select PINCTRL_IMX
|
|
help
|
|
Say Y here to enable the imx51 pinctrl driver
|
|
|
|
config PINCTRL_IMX53
|
|
bool "IMX53 pinctrl driver"
|
|
depends on OF
|
|
depends on SOC_IMX53
|
|
select PINCTRL_IMX
|
|
help
|
|
Say Y here to enable the imx53 pinctrl driver
|
|
|
|
config PINCTRL_IMX6Q
|
|
bool "IMX6Q pinctrl driver"
|
|
depends on OF
|
|
depends on SOC_IMX6Q
|
|
select PINCTRL_IMX
|
|
help
|
|
Say Y here to enable the imx6q pinctrl driver
|
|
|
|
config PINCTRL_PXA3xx
|
|
bool
|
|
select PINMUX
|
|
|
|
config PINCTRL_MMP2
|
|
bool "MMP2 pin controller driver"
|
|
depends on ARCH_MMP
|
|
select PINCTRL_PXA3xx
|
|
select PINCONF
|
|
|
|
config PINCTRL_MXS
|
|
bool
|
|
|
|
config PINCTRL_IMX23
|
|
bool
|
|
select PINMUX
|
|
select PINCONF
|
|
select PINCTRL_MXS
|
|
|
|
config PINCTRL_IMX28
|
|
bool
|
|
select PINMUX
|
|
select PINCONF
|
|
select PINCTRL_MXS
|
|
|
|
config PINCTRL_NOMADIK
|
|
bool "Nomadik pin controller driver"
|
|
depends on ARCH_U8500 || ARCH_NOMADIK
|
|
select PINMUX
|
|
select PINCONF
|
|
|
|
config PINCTRL_STN8815
|
|
bool "STN8815 pin controller driver"
|
|
depends on PINCTRL_NOMADIK && ARCH_NOMADIK
|
|
|
|
config PINCTRL_DB8500
|
|
bool "DB8500 pin controller driver"
|
|
depends on PINCTRL_NOMADIK && ARCH_U8500
|
|
|
|
config PINCTRL_DB8540
|
|
bool "DB8540 pin controller driver"
|
|
depends on PINCTRL_NOMADIK && ARCH_U8500
|
|
|
|
config PINCTRL_PXA168
|
|
bool "PXA168 pin controller driver"
|
|
depends on ARCH_MMP
|
|
select PINCTRL_PXA3xx
|
|
select PINCONF
|
|
|
|
config PINCTRL_PXA910
|
|
bool "PXA910 pin controller driver"
|
|
depends on ARCH_MMP
|
|
select PINCTRL_PXA3xx
|
|
select PINCONF
|
|
|
|
config PINCTRL_SINGLE
|
|
tristate "One-register-per-pin type device tree based pinctrl driver"
|
|
depends on OF
|
|
select PINMUX
|
|
select PINCONF
|
|
help
|
|
This selects the device tree based generic pinctrl driver.
|
|
|
|
config PINCTRL_SIRF
|
|
bool "CSR SiRFprimaII pin controller driver"
|
|
depends on ARCH_PRIMA2
|
|
select PINMUX
|
|
|
|
config PINCTRL_TEGRA
|
|
bool
|
|
|
|
config PINCTRL_TEGRA20
|
|
bool
|
|
select PINMUX
|
|
select PINCONF
|
|
select PINCTRL_TEGRA
|
|
|
|
config PINCTRL_TEGRA30
|
|
bool
|
|
select PINMUX
|
|
select PINCONF
|
|
select PINCTRL_TEGRA
|
|
|
|
config PINCTRL_U300
|
|
bool "U300 pin controller driver"
|
|
depends on ARCH_U300
|
|
select PINMUX
|
|
select GENERIC_PINCONF
|
|
|
|
config PINCTRL_COH901
|
|
bool "ST-Ericsson U300 COH 901 335/571 GPIO"
|
|
depends on GPIOLIB && ARCH_U300 && PINCTRL_U300
|
|
help
|
|
Say yes here to support GPIO interface on ST-Ericsson U300.
|
|
The names of the two IP block variants supported are
|
|
COH 901 335 and COH 901 571/3. They contain 3, 5 or 7
|
|
ports of 8 GPIO pins each.
|
|
|
|
source "drivers/pinctrl/spear/Kconfig"
|
|
|
|
endmenu
|
|
|
|
endif
|