summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirupathi Chippakurthy <thirupathi.chippakurthy@stericsson.com>2011-09-21 09:12:59 +0530
committerRabin VINCENT <rabin.vincent@stericsson.com>2011-09-21 07:41:48 +0200
commit34b69324b070f27c6b45925aa526a491366d7651 (patch)
tree03dac5e3396ed0b87989322d17ca9b32738305b2
parent32e9fac45f48ca3263a2b052b837f1f30c2d039e (diff)
musb:host:Notifier call registered for host enable
Registering notifier call handled, to enable the host funtionality. ST-Ericsson ID: 352334 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I4f415ac61153372c81f6fc4d46ffb1e4e63d0d2c Signed-off-by: <thirupathi.chippakurthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31572 Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
-rw-r--r--drivers/usb/musb/ux500.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index a80663d4187..f860b5ce59a 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -47,11 +47,6 @@ static int musb_otg_notifications(struct notifier_block *nb,
case USB_EVENT_ID:
dev_dbg(musb->controller, "ID GND\n");
if (is_otg_enabled(musb)) {
-#ifdef CONFIG_USB_GADGET_MUSB_HDRC
- if (musb->gadget_driver)
- ux500_musb_set_vbus(musb, 1);
-#endif
- } else {
ux500_musb_set_vbus(musb, 1);
}
break;
@@ -63,13 +58,6 @@ static int musb_otg_notifications(struct notifier_block *nb,
case USB_EVENT_NONE:
dev_dbg(musb->controller, "VBUS Disconnect\n");
-#ifdef CONFIG_USB_GADGET_MUSB_HDRC
- if (is_otg_enabled(musb) || is_peripheral_enabled(musb))
- if (musb->gadget_driver)
-#endif
- {
- dev_dbg(musb->controller, "Add runtime powermangement code here\n");
- }
break;
default:
@@ -140,6 +128,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
static int ux500_musb_init(struct musb *musb)
{
+ int status;
musb->xceiv = otg_get_transceiver();
if (!musb->xceiv) {
pr_err("HS USB OTG: no transceiver configured\n");
@@ -147,7 +136,16 @@ static int ux500_musb_init(struct musb *musb)
}
musb->nb.notifier_call = musb_otg_notifications;
+ status = otg_register_notifier(musb->xceiv, &musb->nb);
+
+ if (status < 0) {
+ dev_dbg(musb->controller, "notification register failed\n");
+ goto err1;
+ }
+
return 0;
+err1:
+ return status;
}
/**