usb: musb: call musb_port_suspend from musb_bus_suspend
authorDaniel Mack <zonque@gmail.com>
Mon, 25 Nov 2013 21:26:41 +0000 (22:26 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 26 Nov 2013 16:35:15 +0000 (10:35 -0600)
Make musb_port_suspend() externally available, and call it when to host
goes into suspend. This allows the core to go into suspend while a
device is connected.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_host.c
drivers/usb/musb/musb_host.h
drivers/usb/musb/musb_virthub.c

index 6582a20bec05db6be2730f6ffee4f3677e6b2340..81caf9f4eb1a0119de8b6a68996e5537638b6099 100644 (file)
@@ -2433,6 +2433,8 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
        struct musb     *musb = hcd_to_musb(hcd);
        u8              devctl;
 
+       musb_port_suspend(musb, true);
+
        if (!is_host_active(musb))
                return 0;
 
index 960d73570b2f55c93bdb77fcf72187772a404aa3..e660af90272d701c0d04f3533eb885a4d1464884 100644 (file)
@@ -92,6 +92,7 @@ extern void musb_host_rx(struct musb *, u8);
 extern void musb_root_disconnect(struct musb *musb);
 extern void musb_host_resume_root_hub(struct musb *musb);
 extern void musb_host_poke_root_hub(struct musb *musb);
+extern void musb_port_suspend(struct musb *musb, bool do_suspend);
 #else
 static inline struct musb *hcd_to_musb(struct usb_hcd *hcd)
 {
@@ -121,6 +122,7 @@ static inline void musb_root_disconnect(struct musb *musb)  {}
 static inline void musb_host_resume_root_hub(struct musb *musb)        {}
 static inline void musb_host_poll_rh_status(struct musb *musb) {}
 static inline void musb_host_poke_root_hub(struct musb *musb)  {}
+static inline void musb_port_suspend(struct musb *musb, bool do_suspend) {}
 #endif
 
 struct usb_hcd;
index 9af6bba5eac964bb7195e78815b22bc1958c6c3c..e977441401edf6b1ad1f987f269e191f3a9b2105 100644 (file)
@@ -44,7 +44,7 @@
 
 #include "musb_core.h"
 
-static void musb_port_suspend(struct musb *musb, bool do_suspend)
+void musb_port_suspend(struct musb *musb, bool do_suspend)
 {
        struct usb_otg  *otg = musb->xceiv->otg;
        u8              power;
This page took 0.030681 seconds and 5 git commands to generate.