aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/isp1704_charger.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c
index 77c11f1d72e2..2ad9b14a5ce3 100644
--- a/drivers/power/isp1704_charger.c
+++ b/drivers/power/isp1704_charger.c
@@ -422,6 +422,23 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
422 422
423 dev_info(isp->dev, "registered with product id %s\n", isp->model); 423 dev_info(isp->dev, "registered with product id %s\n", isp->model);
424 424
425 /*
426 * Taking over the D+ pullup.
427 *
428 * FIXME: The device will be disconnected if it was already
429 * enumerated. The charger driver should be always loaded before any
430 * gadget is loaded.
431 */
432 if (isp->otg->gadget)
433 usb_gadget_disconnect(isp->otg->gadget);
434
435 /* Detect charger if VBUS is valid (the cable was already plugged). */
436 ret = otg_io_read(isp->otg, ULPI_USB_INT_STS);
437 if ((ret & ULPI_INT_VBUS_VALID) && !isp->otg->default_a) {
438 isp->event = USB_EVENT_VBUS;
439 schedule_work(&isp->work);
440 }
441
425 return 0; 442 return 0;
426fail2: 443fail2:
427 power_supply_unregister(&isp->psy); 444 power_supply_unregister(&isp->psy);