Skip to contentSkip to conversation

OMAP4: PMIC: Add support for twl6030 irq framework

RFC PATCH In review [email protected] 1 participant 1 message Jul 20, 2009

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

RFC PATCH 1/4 OMAP4: PMIC: Add support for twl6030 irq framework

From: Balaji T K <[email protected]>

This patch adds support for phoenix interrupt framework. New Interrupt status register A, B, C are introduced in Phoenix and are cleared on write. Due to difference in interrupt handling with respect to TWL4030, twl6030-irq.c is created for TWL6030 PMIC

---
 arch/arm/plat-omap/include/mach/irqs.h |   12 ++
 drivers/mfd/Kconfig                    |   13 ++
 drivers/mfd/Makefile                   |    1 +
 drivers/mfd/twl-core.c                 |   97 +++++++++--
 drivers/mfd/twl6030-irq.c              |  301 ++++++++++++++++++++++++++++++++
 include/linux/i2c/twl.h                |  124 +++++++++++++-
 6 files changed, 531 insertions(+), 17 deletions(-)
 create mode 100644 drivers/mfd/twl6030-irq.c
arch/arm/plat-omap/include/mach/irqs.h +12 -0
index fb7cb77..009cf4d 100644
@@ -551,8 +551,20 @@
 #endif
 #define TWL4030_GPIO_IRQ_END	(TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS)
 
+#define	TWL6030_IRQ_BASE	(OMAP_FPGA_IRQ_END)
+#ifdef CONFIG_TWL6030_CORE
+#define	TWL6030_BASE_NR_IRQS	20
+#else
+#define	TWL6030_BASE_NR_IRQS	0
+#endif
+#define TWL6030_IRQ_END		(TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS)
+
 /* Total number of interrupts depends on the enabled blocks above */
+#ifdef CONFIG_TWL4030_CORE
 #define NR_IRQS			TWL4030_GPIO_IRQ_END
+#else
+#define NR_IRQS			TWL6030_IRQ_END
+#endif
 
 #define OMAP_IRQ_BIT(irq)	(1 << ((irq) % 32))
 
drivers/mfd/Kconfig +13 -0
index 491ac0f..3eec1ac 100644
@@ -108,6 +108,19 @@ config TWL4030_CORE
 	  high speed USB OTG transceiver, an audio codec (on most
 	  versions) and many other features.
 
+config TWL6030_CORE
+	bool "Texas Instruments TWL6030 Support"
+	depends on I2C=y && GENERIC_HARDIRQS
+	depends on !TWL4030_CORE
+	help
+	  Say yes here if you have TWL6030 family chip on your board.
+	  This core driver provides register access and IRQ handling
+	  facilities, and registers devices for the various functions
+	  so that function-specific drivers can bind to them.
+
+	  These multi-function chips are meant for OMAP4 processors,
+	  providing power management, RTC, a USB transciever and a GPADC.
+
 config MFD_TMIO
 	bool
 	default n
drivers/mfd/Makefile +1 -0
index 4e9d513..17c533d 100644
@@ -23,6 +23,7 @@ obj-$(CONFIG_TPS65010)		+= tps65010.o
 obj-$(CONFIG_MENELAUS)		+= menelaus.o
 
 obj-$(CONFIG_TWL4030_CORE)	+= twl-core.o twl4030-irq.o
+obj-$(CONFIG_TWL6030_CORE)	+= twl-core.o twl6030-irq.o
 
 obj-$(CONFIG_MFD_CORE)		+= mfd-core.o
 
drivers/mfd/twl-core.c +86 -11

180 lines not on this page · raw message

drivers/mfd/twl6030-irq.c new file +301 -0

301 lines not on this page · raw message

include/linux/i2c/twl.h +118 -6

153 lines not on this page · raw message

Signature · 1 line
1.5.4.7