diff options
Diffstat (limited to 'drivers/mfd/twl6030-irq.c')
-rw-r--r-- | drivers/mfd/twl6030-irq.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index aaedb11d9d2c..06c8955907e9 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c | |||
@@ -74,7 +74,7 @@ static int twl6030_interrupt_mapping[24] = { | |||
74 | USBOTG_INTR_OFFSET, /* Bit 16 ID_WKUP */ | 74 | USBOTG_INTR_OFFSET, /* Bit 16 ID_WKUP */ |
75 | USBOTG_INTR_OFFSET, /* Bit 17 VBUS_WKUP */ | 75 | USBOTG_INTR_OFFSET, /* Bit 17 VBUS_WKUP */ |
76 | USBOTG_INTR_OFFSET, /* Bit 18 ID */ | 76 | USBOTG_INTR_OFFSET, /* Bit 18 ID */ |
77 | USBOTG_INTR_OFFSET, /* Bit 19 VBUS */ | 77 | USB_PRES_INTR_OFFSET, /* Bit 19 VBUS */ |
78 | CHARGER_INTR_OFFSET, /* Bit 20 CHRG_CTRL */ | 78 | CHARGER_INTR_OFFSET, /* Bit 20 CHRG_CTRL */ |
79 | CHARGER_INTR_OFFSET, /* Bit 21 EXT_CHRG */ | 79 | CHARGER_INTR_OFFSET, /* Bit 21 EXT_CHRG */ |
80 | CHARGER_INTR_OFFSET, /* Bit 22 INT_CHRG */ | 80 | CHARGER_INTR_OFFSET, /* Bit 22 INT_CHRG */ |
@@ -128,6 +128,13 @@ static int twl6030_irq_thread(void *data) | |||
128 | 128 | ||
129 | sts.bytes[3] = 0; /* Only 24 bits are valid*/ | 129 | sts.bytes[3] = 0; /* Only 24 bits are valid*/ |
130 | 130 | ||
131 | /* | ||
132 | * Since VBUS status bit is not reliable for VBUS disconnect | ||
133 | * use CHARGER VBUS detection status bit instead. | ||
134 | */ | ||
135 | if (sts.bytes[2] & 0x10) | ||
136 | sts.bytes[2] |= 0x08; | ||
137 | |||
131 | for (i = 0; sts.int_sts; sts.int_sts >>= 1, i++) { | 138 | for (i = 0; sts.int_sts; sts.int_sts >>= 1, i++) { |
132 | local_irq_disable(); | 139 | local_irq_disable(); |
133 | if (sts.int_sts & 0x1) { | 140 | if (sts.int_sts & 0x1) { |