Skip to contentSkip to conversation

gpio: add GPIO support for SMSC SCH311x

PATCH Superseded Bruno Randolf 2 participants 2 messages Dec 4, 2013 – Dec 20, 2013 GPIO

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 gpio: add GPIO support for SMSC SCH311x

This patch adds support for the GPIOs found on the SMSC "Super I/ SCH311x.

The chip detection and I/O functions are copied from sch311x_wdt.

---
Notes (v3):
- All GPIOs are now supported, driver data is runtime allocated and I tried to address all comments as far as possible.
- Still a platform device is registered, similar to gpio-f7188x.c
- found variable removed
- fixed devm_zalloc

---
 drivers/gpio/Kconfig        |   9 +
 drivers/gpio/Makefile       |   1 +
 drivers/gpio/gpio-sch311x.c | 431 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 441 insertions(+)
 create mode 100644 drivers/gpio/gpio-sch311x.c
drivers/gpio/Kconfig +9 -0
index 0f04444..a083314 100644
@@ -237,6 +237,15 @@ config GPIO_SAMSUNG
 	  Legacy GPIO support. Use only for platforms without support for
 	  pinctrl.
 
+config GPIO_SCH311X
+	tristate "SMSC SCH311x SuperI/O GPIO"
+	help
+	  Driver to enable the GPIOs found on SMSC SMSC SCH3112, SCH3114 and
+	  SCH3116 "Super I/O" chipsets.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called gpio-sch311x.
+
 config GPIO_SPEAR_SPICS
 	bool "ST SPEAr13xx SPI Chip Select as GPIO support"
 	depends on PLAT_SPEAR
drivers/gpio/Makefile +1 -0
index 7971e36..6c53998 100644
@@ -67,6 +67,7 @@ obj-$(CONFIG_GPIO_RCAR)		+= gpio-rcar.o
 obj-$(CONFIG_GPIO_SAMSUNG)	+= gpio-samsung.o
 obj-$(CONFIG_ARCH_SA1100)	+= gpio-sa1100.o
 obj-$(CONFIG_GPIO_SCH)		+= gpio-sch.o
+obj-$(CONFIG_GPIO_SCH311X)	+= gpio-sch311x.o
 obj-$(CONFIG_GPIO_SODAVILLE)	+= gpio-sodaville.o
 obj-$(CONFIG_GPIO_SPEAR_SPICS)	+= gpio-spear-spics.o
 obj-$(CONFIG_GPIO_STA2X11)	+= gpio-sta2x11.o
drivers/gpio/gpio-sch311x.c new file +431 -0

431 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 6 lines · Bruno Randolf

This patch adds support for the GPIOs found on the SMSC "Super I/ SCH311x.

The chip detection and I/O functions are copied from sch311x_wdt.

I have now concluded that this is the best we can do, and Matthew seems to be sort-of-OK with this, so patch applied so that we get some linux-next rotation of this.

Thanks for your efforts on this driver Bruno!

Yours,
Linus Walleij