MFD and GPIO for STA2X11
Subsystems (2)
cover MFD and GPIO for STA2X11
These two patches introduce multi-function device and GPIO support for the STA2X11 I/O Hub. It's an RFC for both as explained below.
- I think the MFD driver is ok. This MFD_STA2X11 config symbol is autoselected by CONFIG_STA2X11, which is pending in the "x86: initial support for sta2x11" patch, for which I need to send V2 later today, with some minor fixes. Similarly, <asm/sta2x11.h> is not upstream yet, so I'll need to resend later, I suppose.
- The GPIO patch has a quirk: I chose to register a single irq chip for 128 interrupts but the generic irq_chip only support 32 interrupts. I'm sure the hack I did (request the irq descs myself) is not good, but what is the best approach here? Using 4 generic irq chips or defining my own, non-generic one?
Thanks a lot
/alessandro
Alessandro Rubini (2):
mfd: Add driver for STA2X11 MFD block
gpio: add STA2X11 GPIO block
drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-sta2x11.c | 380 +++++++++++++++++++++++++++++++ drivers/mfd/Kconfig | 6 + drivers/mfd/Makefile | 1 + drivers/mfd/sta2x11-mfd.c | 470 +++++++++++++++++++++++++++++++++++++++ include/linux/mfd/sta2x11-mfd.h | 186 +++++++++++++++ 7 files changed, 1053 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/gpio-sta2x11.c create mode 100644 drivers/mfd/sta2x11-mfd.c create mode 100644 include/linux/mfd/sta2x11-mfd.h
Signature · 1 line
1.7.7.2
RFC PATCH 1/2 mfd: Add driver for STA2X11 MFD block
This is an RFC as described in the cover letter 0/2
--- drivers/mfd/Kconfig | 6 + drivers/mfd/Makefile | 1 + drivers/mfd/sta2x11-mfd.c | 470 +++++++++++++++++++++++++++++++++++++++ include/linux/mfd/sta2x11-mfd.h | 186 +++++++++++++++ 4 files changed, 663 insertions(+), 0 deletions(-) create mode 100644 drivers/mfd/sta2x11-mfd.c create mode 100644 include/linux/mfd/sta2x11-mfd.h
drivers/mfd/Kconfig +6 -0
@@ -830,6 +830,12 @@ config MFD_INTEL_MSIC Passage) chip. This chip embeds audio, battery, GPIO, etc. devices used in Intel Medfield platforms. +config MFD_STA2X11 + bool "STA2X11 multi function device support" + depends on STA2X11 + select MFD_CORE + select GPIO_STA2X11 + endmenu endif
drivers/mfd/Makefile +1 -0
@@ -15,6 +15,7 @@ obj-$(CONFIG_MFD_DAVINCI_VOICECODEC) += davinci_voicecodec.o obj-$(CONFIG_MFD_DM355EVM_MSP) += dm355evm_msp.o obj-$(CONFIG_MFD_TI_SSP) += ti-ssp.o +obj-$(CONFIG_MFD_STA2X11) += sta2x11-mfd.o obj-$(CONFIG_MFD_STMPE) += stmpe.o obj-$(CONFIG_STMPE_I2C) += stmpe-i2c.o obj-$(CONFIG_STMPE_SPI) += stmpe-spi.o
drivers/mfd/sta2x11-mfd.c new file +470 -0
470 lines not on this page · raw message
include/linux/mfd/sta2x11-mfd.h new file +186 -0
186 lines not on this page · raw message
Signature · 1 line
1.7.7.2
RFC PATCH 2/2 gpio: add STA2X11 GPIO block
In reply to Alessandro RubiniThis introduces 128 gpio bits (for each device) and with interrupt support. It is tested and working, but it's still an RFC.
It still misses the alternate-function and pull-up/pull-down support. I don't know if it should be a different patch or merged in this the next time I submit.
Moreover, this is an RFC as described in the cover letter 0/2
--- drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-sta2x11.c | 380 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 390 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/gpio-sta2x11.c
drivers/gpio/Kconfig +9 -0
@@ -149,6 +149,14 @@ config GPIO_PXA help Say yes here to support the PXA GPIO device +config GPIO_STA2X11 + bool "STA2x11/ConneXt GPIO support" + depends on MFD_STA2X11 + select GENERIC_IRQ_CHIP + help + Say yes here to support the STA2x11/ConneXt GPIO device. + The GPIO module has 128 GPIO pins with alternate functions. + config GPIO_XILINX bool "Xilinx GPIO support" depends on PPC_OF || MICROBLAZE
@@ -489,4 +497,5 @@ config GPIO_TPS65910 help Select this option to enable GPIO driver for the TPS65910 chip family. + endif
drivers/gpio/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o obj-$(CONFIG_GPIO_SCH) += gpio-sch.o +obj-$(CONFIG_GPIO_STA2X11) += gpio-sta2x11.o obj-$(CONFIG_GPIO_STMPE) += gpio-stmpe.o obj-$(CONFIG_GPIO_SX150X) += gpio-sx150x.o obj-$(CONFIG_GPIO_TC3589X) += gpio-tc3589x.o
drivers/gpio/gpio-sta2x11.c new file +380 -0
380 lines not on this page · raw message
Signature · 1 line
1.7.7.2