diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2009-01-25 02:54:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:20:26 -0400 |
commit | c2344f13b59e007d782a3e591ebc551bc583a8b7 (patch) | |
tree | 17eda364b35d5c064c47e45b50487912844a0fa3 /include/linux/usb/otg.h | |
parent | dd44be6b17ac52238aa6c7f46b906d9fb76e7052 (diff) |
USB: gpio_vbus: add delayed vbus_session calls
Call usb_gadget_vbus_connect() and ...disconnect() from a
workqueue rather than from an irq handler, allowing msleep()
calls in vbus_session. Update kerneldoc to match.
[ dbrownell@users.sourceforge.net: more kerneldoc updates ]
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb/otg.h')
-rw-r--r-- | include/linux/usb/otg.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 94df4fe6c6c0..60a52576fd5c 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -86,6 +86,7 @@ extern int otg_set_transceiver(struct otg_transceiver *); | |||
86 | extern struct otg_transceiver *otg_get_transceiver(void); | 86 | extern struct otg_transceiver *otg_get_transceiver(void); |
87 | extern void otg_put_transceiver(struct otg_transceiver *); | 87 | extern void otg_put_transceiver(struct otg_transceiver *); |
88 | 88 | ||
89 | /* Context: can sleep */ | ||
89 | static inline int | 90 | static inline int |
90 | otg_start_hnp(struct otg_transceiver *otg) | 91 | otg_start_hnp(struct otg_transceiver *otg) |
91 | { | 92 | { |
@@ -102,6 +103,8 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
102 | 103 | ||
103 | 104 | ||
104 | /* for usb peripheral controller drivers */ | 105 | /* for usb peripheral controller drivers */ |
106 | |||
107 | /* Context: can sleep */ | ||
105 | static inline int | 108 | static inline int |
106 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) | 109 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) |
107 | { | 110 | { |
@@ -114,6 +117,7 @@ otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
114 | return otg->set_power(otg, mA); | 117 | return otg->set_power(otg, mA); |
115 | } | 118 | } |
116 | 119 | ||
120 | /* Context: can sleep */ | ||
117 | static inline int | 121 | static inline int |
118 | otg_set_suspend(struct otg_transceiver *otg, int suspend) | 122 | otg_set_suspend(struct otg_transceiver *otg, int suspend) |
119 | { | 123 | { |