Skip to contentSkip to conversation

gpio: merrifield: Introduce GPIO driver to support Merrifield

PATCH In review Andy Shevchenko 1 participant 2 messages Jul 11, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 gpio: merrifield: Introduce GPIO driver to support Merrifield

Intel Merrifield platform has a special GPIO controller to drive pads when they are muxed in corresponding mode.

Intel Merrifield GPIO IP is slightly different here and there in comparison to the older Intel MID platforms. These differences include in particular the shaked register offsets, specific support of level triggered interrupts and wake capable sources, as well as a pinctrl which is a separate IP.

Instead of uglifying existing driver I decide to provide a new one slightly based on gpio-intel-mid.c. So, anyone can easily compare what changes are happened to be here.

---
In v3:
- protect irq_set_wake() by spin lock
- add Mika's Ack (hope it's still valid)

 drivers/gpio/Kconfig           |   7 +
 drivers/gpio/Makefile          |   1 +
 drivers/gpio/gpio-merrifield.c | 443 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 451 insertions(+)
 create mode 100644 drivers/gpio/gpio-merrifield.c
drivers/gpio/Kconfig +7 -0
index 3d0c297..7880894 100644
@@ -1032,6 +1032,13 @@ config GPIO_INTEL_MID
 	help
 	  Say Y here to support Intel MID GPIO.
 
+config GPIO_MERRIFIELD
+	tristate "Intel Merrifield GPIO support"
+	depends on X86_INTEL_MID
+	select GPIOLIB_IRQCHIP
+	help
+	  Say Y here to support Intel Merrifield GPIO.
+
 config GPIO_ML_IOH
 	tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
 	select GENERIC_IRQ_CHIP
drivers/gpio/Makefile +1 -0
index 991598e..d6ba958 100644
@@ -63,6 +63,7 @@ obj-$(CONFIG_GPIO_MAX7301)	+= gpio-max7301.o
 obj-$(CONFIG_GPIO_MAX732X)	+= gpio-max732x.o
 obj-$(CONFIG_GPIO_MB86S7X)	+= gpio-mb86s7x.o
 obj-$(CONFIG_GPIO_MENZ127)	+= gpio-menz127.o
+obj-$(CONFIG_GPIO_MERRIFIELD)	+= gpio-merrifield.o
 obj-$(CONFIG_GPIO_MC33880)	+= gpio-mc33880.o
 obj-$(CONFIG_GPIO_MC9S08DZ60)	+= gpio-mc9s08dz60.o
 obj-$(CONFIG_GPIO_MCP23S08)	+= gpio-mcp23s08.o
drivers/gpio/gpio-merrifield.c new file +443 -0

443 lines not on this page · raw message

Signature · 1 line
2.8.1
#1 lore raw
Quoted 12 lines · Andy Shevchenko

Intel Merrifield platform has a special GPIO controller to drive pads when they
are muxed in corresponding mode.

Intel Merrifield GPIO IP is slightly different here and there in comparison to
the older Intel MID platforms. These differences include in particular the
shaked register offsets, specific support of level triggered interrupts and
wake capable sources, as well as a pinctrl which is a separate IP.

Quoted 6 lines

Instead of uglifying existing driver I decide to provide a new one slightly
based on gpio-intel-mid.c. So, anyone can easily compare what changes are
happened to be here.

Please, discard this since previous is already applied. Moreover this one has a typo, so, needs to be addressed anyway.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy