Commit cf27973d authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

remove some global twl4030 IRQ defines

Disable more unnecessary TWL4030_*IRQ_* symbols.

We're not yet ready to remove them all from <linux/i2c/twl4030.h>
since various drivers still use those symbols (maybe indirectly)
not platform resources: twl4030_bci_battery.c, twl4030-madc.c,
twl4030-pwrbutton.c, and omap-twl4030keypad.c all need updates.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 1703be8f
...@@ -352,6 +352,12 @@ EXPORT_SYMBOL(twl4030_i2c_read_u8); ...@@ -352,6 +352,12 @@ EXPORT_SYMBOL(twl4030_i2c_read_u8);
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
/*
* NOTE: We know the first 8 IRQs after pdata->base_irq are
* for the PIH, and the next are for the PWR_INT SIH, since
* that's how twl_init_irq() sets things up.
*/
static int add_children(struct twl4030_platform_data *pdata) static int add_children(struct twl4030_platform_data *pdata)
{ {
struct platform_device *pdev = NULL; struct platform_device *pdev = NULL;
...@@ -382,7 +388,7 @@ static int add_children(struct twl4030_platform_data *pdata) ...@@ -382,7 +388,7 @@ static int add_children(struct twl4030_platform_data *pdata)
if (status == 0) { if (status == 0) {
struct resource r = { struct resource r = {
.start = TWL4030_PWRIRQ_CHG_PRES, .start = pdata->irq_base + 8 + 1,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}; };
...@@ -531,8 +537,7 @@ static int add_children(struct twl4030_platform_data *pdata) ...@@ -531,8 +537,7 @@ static int add_children(struct twl4030_platform_data *pdata)
/* RTC module IRQ */ /* RTC module IRQ */
if (status == 0) { if (status == 0) {
struct resource r = { struct resource r = {
/* REVISIT don't hard-wire this stuff */ .start = pdata->irq_base + 8 + 3,
.start = TWL4030_PWRIRQ_RTC,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}; };
...@@ -577,7 +582,7 @@ static int add_children(struct twl4030_platform_data *pdata) ...@@ -577,7 +582,7 @@ static int add_children(struct twl4030_platform_data *pdata)
if (status == 0) { if (status == 0) {
struct resource r = { struct resource r = {
.start = TWL4030_PWRIRQ_USB_PRES, .start = pdata->irq_base + 8 + 2,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}; };
......
...@@ -293,16 +293,16 @@ int twl4030_sih_setup(int module); ...@@ -293,16 +293,16 @@ int twl4030_sih_setup(int module);
#define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2) #define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2)
#define TWL4030_MODIRQ_MADC (TWL4030_IRQ_BASE + 3) #define TWL4030_MODIRQ_MADC (TWL4030_IRQ_BASE + 3)
/* #define TWL4030_MODIRQ_USB (TWL4030_IRQ_BASE + 4) */ /* #define TWL4030_MODIRQ_USB (TWL4030_IRQ_BASE + 4) */
#define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5) /* #define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5) */
#define TWL4030_PWRIRQ_PWRBTN (TWL4030_PWR_IRQ_BASE + 0) #define TWL4030_PWRIRQ_PWRBTN (TWL4030_PWR_IRQ_BASE + 0)
#define TWL4030_PWRIRQ_CHG_PRES (TWL4030_PWR_IRQ_BASE + 1) /* #define TWL4030_PWRIRQ_CHG_PRES (TWL4030_PWR_IRQ_BASE + 1) */
#define TWL4030_PWRIRQ_USB_PRES (TWL4030_PWR_IRQ_BASE + 2) /* #define TWL4030_PWRIRQ_USB_PRES (TWL4030_PWR_IRQ_BASE + 2) */
#define TWL4030_PWRIRQ_RTC (TWL4030_PWR_IRQ_BASE + 3) /* #define TWL4030_PWRIRQ_RTC (TWL4030_PWR_IRQ_BASE + 3) */
#define TWL4030_PWRIRQ_HOT_DIE (TWL4030_PWR_IRQ_BASE + 4) /* #define TWL4030_PWRIRQ_HOT_DIE (TWL4030_PWR_IRQ_BASE + 4) */
#define TWL4030_PWRIRQ_PWROK_TIMEOUT (TWL4030_PWR_IRQ_BASE + 5) /* #define TWL4030_PWRIRQ_PWROK_TIMEOUT (TWL4030_PWR_IRQ_BASE + 5) */
#define TWL4030_PWRIRQ_MBCHG (TWL4030_PWR_IRQ_BASE + 6) /* #define TWL4030_PWRIRQ_MBCHG (TWL4030_PWR_IRQ_BASE + 6) */
#define TWL4030_PWRIRQ_SC_DETECT (TWL4030_PWR_IRQ_BASE + 7) /* #define TWL4030_PWRIRQ_SC_DETECT (TWL4030_PWR_IRQ_BASE + 7) */
/* Rest are unsued currently*/ /* Rest are unsued currently*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment