From 21886c80d13e52fcfe82a1831e5c8bba093b37ff Mon Sep 17 00:00:00 2001 From: Hema HK Date: Fri, 10 Dec 2010 17:55:37 +0530 Subject: [PATCH] --- yaml --- r: 227016 b: refs/heads/master c: 77b1d3fa88dcb9d6e885926f972c421e4069b849 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mfd/twl6030-irq.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1671091b70cf..0356556db52d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4bc36fd31b07054bdf7378cca7162c10598f3eff +refs/heads/master: 77b1d3fa88dcb9d6e885926f972c421e4069b849 diff --git a/trunk/drivers/mfd/twl6030-irq.c b/trunk/drivers/mfd/twl6030-irq.c index aaedb11d9d2c..06c8955907e9 100644 --- a/trunk/drivers/mfd/twl6030-irq.c +++ b/trunk/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) {