Skip to contentSkip to conversation

GPIO: add support for NXP 74HC164 GPIO expander

PATCH New Florian Fainelli 1 participant 1 message Aug 28, 2010 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 GPIO: add support for NXP 74HC164 GPIO expander

From: Miguel Gaio <[email protected]>

This patch adds support for NXP's 74HC164 GPIO expander.

---

drivers/gpio/Kconfig +8 -0
index 510aa20..1008901 100644
@@ -361,4 +361,12 @@ config GPIO_JANZ_TTL
 	  This driver provides support for driving the pins in output
 	  mode only. Input mode is not supported.
 
+comment "Other GPIO expanders"
+
+config GPIO_NXP_74HC164
+       tristate "NXP 74HC164 Output expanders"
+       help
+         Platform driver for NXP 74HC164 8-output Expanders. This
+         provides a GPIO interface supporting outputs.
+
 endif
drivers/gpio/Makefile +1 -0
index fc6019d..63221bf 100644
@@ -17,6 +17,7 @@ obj-$(CONFIG_GPIO_MAX7301)	+= max7301.o
 obj-$(CONFIG_GPIO_MAX732X)	+= max732x.o
 obj-$(CONFIG_GPIO_MC33880)	+= mc33880.o
 obj-$(CONFIG_GPIO_MCP23S08)	+= mcp23s08.o
+obj-$(CONFIG_GPIO_NXP_74HC164)	+= nxp_74hc164.o
 obj-$(CONFIG_GPIO_PCA953X)	+= pca953x.o
 obj-$(CONFIG_GPIO_PCF857X)	+= pcf857x.o
 obj-$(CONFIG_GPIO_PL061)	+= pl061.o
drivers/gpio/nxp_74hc164.c new file +227 -0

227 lines not on this page · raw message

include/linux/nxp_74hc164.h new file +22 -0
new file mode 100644
index 0000000..eb0201f
@@ -0,0 +1,22 @@
+/*
+ *  NXP 74HC164 - Dual 4-input multiplexer defines
+ *
+ *  Copyright (C) 2010 Gabor Juhos <[email protected]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#ifndef _NXP_74HC164_H
+#define _NXP_74HC164_H
+
+#define NXP_74HC164_DRIVER_NAME "nxp-74hc164"
+
+struct nxp_74hc164_platform_data {
+	unsigned	gpio_base;
+	unsigned	gpio_pin_data;
+	unsigned	gpio_pin_clk;
+};
+
+#endif /* _NXP_74HC164_H */