aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/otg.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 09:43:54 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 10:06:11 -0400
commit7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch)
tree5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /include/linux/usb/otg.h
parent7d754596756240fa918b94cd0c3011c77a638987 (diff)
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
Merge 'Linux v3.0' into Litmus
Some notes: * Litmus^RT scheduling class is the topmost scheduling class (above stop_sched_class). * scheduler_ipi() function (e.g., in smp_reschedule_interrupt()) may increase IPI latencies. * Added path into schedule() to quickly re-evaluate scheduling decision without becoming preemptive again. This used to be a standard path before the removal of BKL. Conflicts: Makefile arch/arm/kernel/calls.S arch/arm/kernel/smp.c arch/x86/include/asm/unistd_32.h arch/x86/kernel/smp.c arch/x86/kernel/syscall_table_32.S include/linux/hrtimer.h kernel/printk.c kernel/sched.c kernel/sched_fair.c
Diffstat (limited to 'include/linux/usb/otg.h')
-rw-r--r--include/linux/usb/otg.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 545cba73ccaf..d87f44f5b04e 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -66,6 +66,7 @@ struct otg_transceiver {
66 66
67 u8 default_a; 67 u8 default_a;
68 enum usb_otg_state state; 68 enum usb_otg_state state;
69 enum usb_xceiv_events last_event;
69 70
70 struct usb_bus *host; 71 struct usb_bus *host;
71 struct usb_gadget *gadget; 72 struct usb_gadget *gadget;
@@ -74,7 +75,7 @@ struct otg_transceiver {
74 void __iomem *io_priv; 75 void __iomem *io_priv;
75 76
76 /* for notification of usb_xceiv_events */ 77 /* for notification of usb_xceiv_events */
77 struct blocking_notifier_head notifier; 78 struct atomic_notifier_head notifier;
78 79
79 /* to pass extra port status to the root hub */ 80 /* to pass extra port status to the root hub */
80 u16 port_status; 81 u16 port_status;
@@ -116,7 +117,7 @@ struct otg_transceiver {
116/* for board-specific init logic */ 117/* for board-specific init logic */
117extern int otg_set_transceiver(struct otg_transceiver *); 118extern int otg_set_transceiver(struct otg_transceiver *);
118 119
119#if defined(CONFIG_NOP_USB_XCEIV) || defined(CONFIG_NOP_USB_XCEIV_MODULE) 120#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
120/* sometimes transceivers are accessed only through e.g. ULPI */ 121/* sometimes transceivers are accessed only through e.g. ULPI */
121extern void usb_nop_xceiv_register(void); 122extern void usb_nop_xceiv_register(void);
122extern void usb_nop_xceiv_unregister(void); 123extern void usb_nop_xceiv_unregister(void);
@@ -164,8 +165,25 @@ otg_shutdown(struct otg_transceiver *otg)
164} 165}
165 166
166/* for usb host and peripheral controller drivers */ 167/* for usb host and peripheral controller drivers */
168#ifdef CONFIG_USB_OTG_UTILS
167extern struct otg_transceiver *otg_get_transceiver(void); 169extern struct otg_transceiver *otg_get_transceiver(void);
168extern void otg_put_transceiver(struct otg_transceiver *); 170extern void otg_put_transceiver(struct otg_transceiver *);
171extern const char *otg_state_string(enum usb_otg_state state);
172#else
173static inline struct otg_transceiver *otg_get_transceiver(void)
174{
175 return NULL;
176}
177
178static inline void otg_put_transceiver(struct otg_transceiver *x)
179{
180}
181
182static inline const char *otg_state_string(enum usb_otg_state state)
183{
184 return NULL;
185}
186#endif
169 187
170/* Context: can sleep */ 188/* Context: can sleep */
171static inline int 189static inline int
@@ -223,13 +241,13 @@ otg_start_srp(struct otg_transceiver *otg)
223static inline int 241static inline int
224otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) 242otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb)
225{ 243{
226 return blocking_notifier_chain_register(&otg->notifier, nb); 244 return atomic_notifier_chain_register(&otg->notifier, nb);
227} 245}
228 246
229static inline void 247static inline void
230otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) 248otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb)
231{ 249{
232 blocking_notifier_chain_unregister(&otg->notifier, nb); 250 atomic_notifier_chain_unregister(&otg->notifier, nb);
233} 251}
234 252
235/* for OTG controller drivers (and maybe other stuff) */ 253/* for OTG controller drivers (and maybe other stuff) */