/*----------------------------------------------------------------------*/
+/*
+ * 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)
{
struct platform_device *pdev = NULL;
if (status == 0) {
struct resource r = {
- .start = TWL4030_PWRIRQ_CHG_PRES,
+ .start = pdata->irq_base + 8 + 1,
.flags = IORESOURCE_IRQ,
};
/* RTC module IRQ */
if (status == 0) {
struct resource r = {
- /* REVISIT don't hard-wire this stuff */
- .start = TWL4030_PWRIRQ_RTC,
+ .start = pdata->irq_base + 8 + 3,
.flags = IORESOURCE_IRQ,
};
if (status == 0) {
struct resource r = {
- .start = TWL4030_PWRIRQ_USB_PRES,
+ .start = pdata->irq_base + 8 + 2,
.flags = IORESOURCE_IRQ,
};