gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders
PATCH 1/1 gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders
From: Michael Hennerich <[email protected]>
Signed-off-by Michael Hennerich <[email protected]>
Signed-off-by Mike Frysinger <[email protected]>
--- drivers/gpio/Kconfig | 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/adp5588-gpio.c | 266 +++++++++++++++++++++++++++++++++++++++++++ include/linux/i2c/adp5588.h | 12 ++ 4 files changed, 288 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/adp5588-gpio.c
drivers/gpio/Kconfig +9 -0
@@ -172,6 +172,15 @@ config GPIO_ADP5520 To compile this driver as a module, choose M here: the module will be called adp5520-gpio. +config GPIO_ADP5588 + tristate "ADP5588 I2C GPIO expander" + depends on I2C + help + This option enables support for 18 GPIOs found + on Analog Devices ADP5588 GPIO Expanders. + To compile this driver as a module, choose M here: the module will be + called adp5588-gpio. + comment "PCI GPIO expanders:" config GPIO_CS5535
drivers/gpio/Makefile +1 -0
@@ -5,6 +5,7 @@ ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG obj-$(CONFIG_GPIOLIB) += gpiolib.o obj-$(CONFIG_GPIO_ADP5520) += adp5520-gpio.o +obj-$(CONFIG_GPIO_ADP5588) += adp5588-gpio.o obj-$(CONFIG_GPIO_LANGWELL) += langwell_gpio.o obj-$(CONFIG_GPIO_MAX7301) += max7301.o obj-$(CONFIG_GPIO_MAX732X) += max732x.o
drivers/gpio/adp5588-gpio.c new file +266 -0
266 lines not on this page · raw message
include/linux/i2c/adp5588.h +12 -0
@@ -89,4 +89,16 @@ struct adp5588_kpad_platform_data { unsigned short unlock_key2; /* Unlock Key 2 */ }; +struct adp5588_gpio_platform_data { +unsigned gpio_start;/* GPIO Chip base # */ +unsigned pullup_dis_mask;/* Pull-Up Disable Mask */ +int (*setup)(struct i2c_client *client, +int gpio,unsigned ngpio, +void *context); +int (*teardown)(struct i2c_client *client, +int gpio,unsigned ngpio, +void *context); +void *context; +}; +#endif
Signature · 1 line
1.6.5.4
drivers/gpio/Kconfig config GPIO_ADP5520 · line 182
Quoted 8 lines · On Mon, 21 Dec 2009 21:01:42 -0500 Mike Frysinger <[email protected]> wrote:
drivers/gpio/Kconfig +8
-0+config GPIO_ADP5588 + tristate "ADP5588 I2C GPIO expander" + depends on I2C + help + This option enables support for 18 GPIOs found + on Analog Devices ADP5588 GPIO Expanders. + To compile this driver as a module, choose M here: the module will be + called adp5588-gpio.
A neat little driver. I don't see much to be gained by holding it off for 2.6.34, so I'll queue it for .33.