diff options
author | Thirupathi Chippakurthy <thirupathi.chippakurthy@stericsson.com> | 2011-09-21 09:12:59 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:03:09 +0200 |
commit | 6f45681b852d2016fe09d7781fc411058756cb52 (patch) | |
tree | bed9daa149435156c590117f3107cb1f3ca6e52f | |
parent | 4d83f7fe5865287fd6b30851262bec9e9b6f05ae (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.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index 201c6de0082..6bd8ab3d798 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 = usb_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; } /** |