diff options
author | Daniel Mack <zonque@gmail.com> | 2013-11-25 16:26:41 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-11-26 11:35:15 -0500 |
commit | 94f72136a86141604bcab75a2548b6488e70128d (patch) | |
tree | 21b6eb82743325b9f381822a1e188367f08a5ed0 /drivers/usb | |
parent | c338412b5dedf405d3f8ba3af1a61fa623319e1d (diff) |
usb: musb: call musb_port_suspend from musb_bus_suspend
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_host.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_host.h | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_virthub.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 6582a20bec05..81caf9f4eb1a 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -2433,6 +2433,8 @@ static int musb_bus_suspend(struct usb_hcd *hcd) | |||
2433 | struct musb *musb = hcd_to_musb(hcd); | 2433 | struct musb *musb = hcd_to_musb(hcd); |
2434 | u8 devctl; | 2434 | u8 devctl; |
2435 | 2435 | ||
2436 | musb_port_suspend(musb, true); | ||
2437 | |||
2436 | if (!is_host_active(musb)) | 2438 | if (!is_host_active(musb)) |
2437 | return 0; | 2439 | return 0; |
2438 | 2440 | ||
diff --git a/drivers/usb/musb/musb_host.h b/drivers/usb/musb/musb_host.h index 960d73570b2f..e660af90272d 100644 --- a/drivers/usb/musb/musb_host.h +++ b/drivers/usb/musb/musb_host.h | |||
@@ -92,6 +92,7 @@ extern void musb_host_rx(struct musb *, u8); | |||
92 | extern void musb_root_disconnect(struct musb *musb); | 92 | extern void musb_root_disconnect(struct musb *musb); |
93 | extern void musb_host_resume_root_hub(struct musb *musb); | 93 | extern void musb_host_resume_root_hub(struct musb *musb); |
94 | extern void musb_host_poke_root_hub(struct musb *musb); | 94 | extern void musb_host_poke_root_hub(struct musb *musb); |
95 | extern void musb_port_suspend(struct musb *musb, bool do_suspend); | ||
95 | #else | 96 | #else |
96 | static inline struct musb *hcd_to_musb(struct usb_hcd *hcd) | 97 | static inline struct musb *hcd_to_musb(struct usb_hcd *hcd) |
97 | { | 98 | { |
@@ -121,6 +122,7 @@ static inline void musb_root_disconnect(struct musb *musb) {} | |||
121 | static inline void musb_host_resume_root_hub(struct musb *musb) {} | 122 | static inline void musb_host_resume_root_hub(struct musb *musb) {} |
122 | static inline void musb_host_poll_rh_status(struct musb *musb) {} | 123 | static inline void musb_host_poll_rh_status(struct musb *musb) {} |
123 | static inline void musb_host_poke_root_hub(struct musb *musb) {} | 124 | static inline void musb_host_poke_root_hub(struct musb *musb) {} |
125 | static inline void musb_port_suspend(struct musb *musb, bool do_suspend) {} | ||
124 | #endif | 126 | #endif |
125 | 127 | ||
126 | struct usb_hcd; | 128 | struct usb_hcd; |
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index 9af6bba5eac9..e977441401ed 100644 --- a/drivers/usb/musb/musb_virthub.c +++ b/drivers/usb/musb/musb_virthub.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | #include "musb_core.h" | 45 | #include "musb_core.h" |
46 | 46 | ||
47 | static void musb_port_suspend(struct musb *musb, bool do_suspend) | 47 | void musb_port_suspend(struct musb *musb, bool do_suspend) |
48 | { | 48 | { |
49 | struct usb_otg *otg = musb->xceiv->otg; | 49 | struct usb_otg *otg = musb->xceiv->otg; |
50 | u8 power; | 50 | u8 power; |