twl4030 uses gpiolib
PATCH 2/2 twl4030 uses gpiolib
From: David Brownell <[email protected]>
Make the twl4030 core create a platform device to which its GPIO code will bind, with platform_data used to configure board-specific behaviors and configuration.
Update the twl4030 GPIO code:
- Morph its gpio function code into a platform driver.
- Move away from IRQ (and GPIO) numbers hard-wired in headers.
- Hook up the twl4030 GPIO code to gpiolib.
- Start phasing out the older TWL-specific calls ... currently those are used only by arch/arm/mach-omap2/hsmmc.c setup code.
- Use a mutex for locking, not a binary semaphore.
NOTE: more patches pending: (a) this doesn't use pdata->pullups to initialize (currently hsmmc code always sets GPIO-0 pullup even if the board has an external pullup); (b) there's a new gpio request/free hook forthcoming in 2.6.28, which this should use;
(c) likewise there's a new gpio_to_irq() hook; (d) the irq_chip set_type() mechanism needs to be supported; (e) needs to move over to drivers/gpio; (f) upcoming threaded IRQ infrastructure should be used, when that merges.
--- drivers/i2c/chips/Kconfig | 2 drivers/i2c/chips/twl4030-core.c | 44 +++++ drivers/i2c/chips/twl4030-gpio.c | 273 ++++++++++++++++++++++++++----------- 3 files changed, 238 insertions(+), 81 deletions(-)
drivers/i2c/chips/Kconfig +1 -1
@@ -159,7 +159,7 @@ config TWL4030_CORE config TWL4030_GPIO bool "TWL4030 GPIO Driver" - depends on TWL4030_CORE + depends on TWL4030_CORE && GPIOLIB config TWL4030_MADC tristate "TWL4030 MADC Driver"
drivers/i2c/chips/twl4030-core.c +44 -0
56 lines not on this page · raw message
drivers/i2c/chips/twl4030-gpio.c +193 -80
547 lines not on this page · raw message