Skip to contentSkip to conversation

gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders

PATCH In review Mike Frysinger 2 participants 2 messages Dec 22, 2009 – Dec 30, 2009 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders

From: Michael Hennerich <[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
index a019b49..1f1d88a 100644
@@ -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
index 52fe4cf..4868723 100644
@@ -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
index fc5db82..02c9af3 100644
@@ -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
#1 lore raw

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.