aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-ab8500-usb.c
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@linaro.org>2013-04-03 04:45:10 -0400
committerFelipe Balbi <balbi@ti.com>2013-04-03 05:02:21 -0400
commit77f4396ecb3396e518da60f915bbd4726732fd70 (patch)
tree107d303abdae1513ab7f2f44a7e5ba24294e9dae /drivers/usb/phy/phy-ab8500-usb.c
parentf5ef7b42823945d979ebd957e79bf66dc6a5e3d1 (diff)
usb: phy: ab8500-usb: fix last notifier arguments
Fix last ab->phy.notifier call to use vbus_draw as notifier argument, as that's used in ab8500_charger to control charging current. Also drop a related TODO comment, and the additional ux500_musb_set_vbus(musb, 0), as with this patch it was causing an erratic behaviour of gadget ep0 state machine. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-ab8500-usb.c')
-rw-r--r--drivers/usb/phy/phy-ab8500-usb.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index fec260ee67d3..888dad65bf9b 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -578,16 +578,12 @@ static int ab8500_usb_set_power(struct usb_phy *phy, unsigned mA)
578 578
579 ab->vbus_draw = mA; 579 ab->vbus_draw = mA;
580 580
581 if (mA) 581 atomic_notifier_call_chain(&ab->phy.notifier,
582 atomic_notifier_call_chain(&ab->phy.notifier, 582 UX500_MUSB_VBUS, &ab->vbus_draw);
583 UX500_MUSB_ENUMERATED, ab->phy.otg->gadget); 583
584 return 0; 584 return 0;
585} 585}
586 586
587/* TODO: Implement some way for charging or other drivers to read
588 * ab->vbus_draw.
589 */
590
591static int ab8500_usb_set_suspend(struct usb_phy *x, int suspend) 587static int ab8500_usb_set_suspend(struct usb_phy *x, int suspend)
592{ 588{
593 /* TODO */ 589 /* TODO */