Skip to contentSkip to conversation

gpiolib: Add support for WM8350 GPIO controller

PATCH New Mark Brown 1 participant 1 message Jan 7, 2010

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 gpiolib: Add support for WM8350 GPIO controller

---
 drivers/gpio/Kconfig            |    7 ++
 drivers/gpio/Makefile           |    1 +
 drivers/gpio/wm8350-gpiolib.c   |  181 +++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/wm8350/core.h |    2 +
 include/linux/mfd/wm8350/gpio.h |    1 +
 5 files changed, 192 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpio/wm8350-gpiolib.c
drivers/gpio/Kconfig +7 -0
index a019b49..e353fa1 100644
@@ -162,6 +162,13 @@ config GPIO_WM831X
 	  Say yes here to access the GPIO signals of WM831x power management
 	  chips from Wolfson Microelectronics.
 
+config GPIO_WM8350
+	tristate "WM8350 GPIOs"
+	depends on MFD_WM8350
+	help
+	  Say yes here to access the GPIO signals of WM8350 power management
+	  chips from Wolfson Microelectronics.
+
 config GPIO_ADP5520
 	tristate "GPIO Support for ADP5520 PMIC"
 	depends on PMIC_ADP5520
drivers/gpio/Makefile +1 -0
index 52fe4cf..970a271 100644
@@ -21,3 +21,4 @@ obj-$(CONFIG_GPIO_CS5535)	+= cs5535-gpio.o
 obj-$(CONFIG_GPIO_BT8XX)	+= bt8xxgpio.o
 obj-$(CONFIG_GPIO_VR41XX)	+= vr41xx_giu.o
 obj-$(CONFIG_GPIO_WM831X)	+= wm831x-gpio.o
+obj-$(CONFIG_GPIO_WM8350)	+= wm8350-gpiolib.o
drivers/gpio/wm8350-gpiolib.c new file +181 -0

181 lines not on this page · raw message

include/linux/mfd/wm8350/core.h +2 -0
index 04217a7..fae08aa 100644
@@ -645,11 +645,13 @@ struct wm8350 {
  *        used by the platform to configure GPIO functions and similar.
  * @irq_high: Set if WM8350 IRQ is active high.
  * @irq_base: Base IRQ for genirq (not currently used).
+ * @gpio_base: Base for gpiolib.
  */
 struct wm8350_platform_data {
 	int (*init)(struct wm8350 *wm8350);
 	int irq_high;
 	int irq_base;
+	int gpio_base;
 };
 
 
include/linux/mfd/wm8350/gpio.h +1 -0
index 71af3d6..d657bcd 100644
@@ -29,6 +29,7 @@
 #define WM8350_GPIO_FUNCTION_SELECT_2           0x8D
 #define WM8350_GPIO_FUNCTION_SELECT_3           0x8E
 #define WM8350_GPIO_FUNCTION_SELECT_4           0x8F
+#define WM8350_GPIO_LEVEL			0xE6
 
 /*
  * GPIO Functions
Signature · 1 line
1.6.6