diff options
author | Peter Chen <peter.chen@freescale.com> | 2013-11-27 15:35:42 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2013-11-27 17:19:53 +0800 |
commit | 72ddc9c8f537d0c326bc204a88bda1c4da21d191 (patch) | |
tree | 7589c11843ff88c3e629355e065b648793fd652e /drivers | |
parent | bf046b0e7762cef5ec5ad4e38ecaa5dbad53f2ec (diff) |
ENGR00289855 usb: chipidea: udc: pull down dp before the charger detection
If rom code or bootloader has used usb before loading kernel, the dp
may still be pulled up, it will cause USB charger detection fail.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 0b2023f282a6..7ee9b92edbaa 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1479,10 +1479,12 @@ static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active) * It can make disconnect interrupt (BSV 1->0) occur when * the cable is disconnected. */ - if (is_active) + if (is_active) { pm_runtime_get_sync(&_gadget->dev); - else + hw_write(ci, OP_USBCMD, USBCMD_RS, 0); + } else { pm_runtime_put_sync(&_gadget->dev); + } ret = ci->platdata->notify_event (ci, CI_HDRC_CONTROLLER_CHARGER_EVENT); |