summaryrefslogtreecommitdiff
path: root/drivers/usb/otg/ab8500-usb.c
diff options
context:
space:
mode:
authorThirupathi Chippakurthy <thirupathi.chippakurthy@stericsson.com>2011-11-29 18:37:44 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:12 +0200
commit9107c03b38b67ae82f905fecf582a9501fb48036 (patch)
treefa95bdba12adb130e4b8576ab1ae9a845c9d3eb9 /drivers/usb/otg/ab8500-usb.c
parented6b8a71d3ab63d73749278896ac515fc2ad0ca2 (diff)
ux500: usb:handle connection of microA to A cable
Connect Micro-A to phone first,Then connect device usb session should be valid to detect the connected device,Until host cable (micro-A) removal. MUSB session bit is cleared when usb host cable (Micro-A) removal from the phone,Not in case of only device disconnection from the usb host cable. ST-Ericsson ID: 364426 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Signed-off-by: Thirupathi <thirupathi.chippakurthy@stericsson.com>
Diffstat (limited to 'drivers/usb/otg/ab8500-usb.c')
-rw-r--r--drivers/usb/otg/ab8500-usb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c
index 189e764a68d..f51ac3fe836 100644
--- a/drivers/usb/otg/ab8500-usb.c
+++ b/drivers/usb/otg/ab8500-usb.c
@@ -413,10 +413,17 @@ static void ab8500_usb_delayed_work(struct work_struct *work)
static irqreturn_t ab8500_usb_disconnect_irq(int irq, void *data)
{
struct ab8500_usb *ab = (struct ab8500_usb *) data;
+ enum usb_xceiv_events event;
/* Link status will not be updated till phy is disabled. */
- if (ab->mode == USB_HOST)
+ if (ab->mode == USB_HOST) {
+ event = USB_EVENT_NONE;
+ ab->otg.default_a = false;
+ ab->vbus_draw = 0;
+ atomic_notifier_call_chain(&ab->otg.notifier,
+ event, &ab->vbus_draw);
ab8500_usb_host_phy_dis(ab);
+ }
else if (ab->mode == USB_PERIPHERAL)
ab8500_usb_peri_phy_dis(ab);
else if (ab->mode == USB_DEDICATED_CHG && ab->rev == 0x20) {