diff options
Diffstat (limited to 'drivers/mfd/twl6030-irq.c')
-rw-r--r-- | drivers/mfd/twl6030-irq.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index aaedb11d9d2..4082ed73613 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c @@ -74,7 +74,7 @@ static int twl6030_interrupt_mapping[24] = { USBOTG_INTR_OFFSET, /* Bit 16 ID_WKUP */ USBOTG_INTR_OFFSET, /* Bit 17 VBUS_WKUP */ USBOTG_INTR_OFFSET, /* Bit 18 ID */ - USBOTG_INTR_OFFSET, /* Bit 19 VBUS */ + USB_PRES_INTR_OFFSET, /* Bit 19 VBUS */ CHARGER_INTR_OFFSET, /* Bit 20 CHRG_CTRL */ CHARGER_INTR_OFFSET, /* Bit 21 EXT_CHRG */ CHARGER_INTR_OFFSET, /* Bit 22 INT_CHRG */ @@ -128,6 +128,13 @@ static int twl6030_irq_thread(void *data) sts.bytes[3] = 0; /* Only 24 bits are valid*/ + /* + * Since VBUS status bit is not reliable for VBUS disconnect + * use CHARGER VBUS detection status bit instead. + */ + if (sts.bytes[2] & 0x10) + sts.bytes[2] |= 0x08; + for (i = 0; sts.int_sts; sts.int_sts >>= 1, i++) { local_irq_disable(); if (sts.int_sts & 0x1) { @@ -325,7 +332,7 @@ int twl6030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end) */ twl6030_irq_chip = dummy_irq_chip; twl6030_irq_chip.name = "twl6030"; - twl6030_irq_chip.set_type = NULL; + twl6030_irq_chip.irq_set_type = NULL; for (i = irq_base; i < irq_end; i++) { set_irq_chip_and_handler(i, &twl6030_irq_chip, |