Lines Matching refs:musb

29 struct musb;
55 #define is_peripheral_enabled(musb) ((musb)->board_mode != MUSB_HOST) argument
56 #define is_host_enabled(musb) ((musb)->board_mode != MUSB_PERIPHERAL) argument
57 #define is_otg_enabled(musb) ((musb)->board_mode == MUSB_OTG) argument
82 extern irqreturn_t musb_g_ep0_irq(struct musb *);
83 extern void musb_g_tx(struct musb *, u8);
84 extern void musb_g_rx(struct musb *, u8);
85 extern void musb_g_reset(struct musb *);
86 extern void musb_g_suspend(struct musb *);
87 extern void musb_g_resume(struct musb *);
88 extern void musb_g_wakeup(struct musb *);
89 extern void musb_g_disconnect(struct musb *);
103 extern irqreturn_t musb_h_ep0_irq(struct musb *);
104 extern void musb_host_tx(struct musb *, u8);
105 extern void musb_host_rx(struct musb *, u8);
190 #define MUSB_MODE(musb) ((musb)->is_host ? "Host" : "Peripheral") argument
207 int (*init)(struct musb *musb);
208 int (*exit)(struct musb *musb);
211 void (*enable)(struct musb *musb);
213 int (*enable)(struct musb *musb);
215 void (*disable)(struct musb *musb);
217 int (*set_mode)(struct musb *musb, u8 mode);
218 void (*try_idle)(struct musb *musb, unsigned long timeout);
220 int (*vbus_status)(struct musb *musb);
221 void (*set_vbus)(struct musb *musb, int on);
226 void (*pre_root_reset_end)(struct musb *musb);
227 void (*post_root_reset_end)(struct musb *musb);
236 struct musb *musb; member
317 struct musb { struct
404 #define can_bulk_split(musb,type) \ argument
405 (((type) == USB_ENDPOINT_XFER_BULK) && (musb)->bulk_split)
408 #define can_bulk_combine(musb,type) \ argument
409 (((type) == USB_ENDPOINT_XFER_BULK) && (musb)->bulk_combine)
455 static inline struct musb *gadget_to_musb(struct usb_gadget *g) in gadget_to_musb() argument
457 return container_of(g, struct musb, g); in gadget_to_musb()
460 static inline int musb_read_fifosize(struct musb *musb, in musb_read_fifosize() argument
463 void *mbase = musb->mregs; in musb_read_fifosize()
472 musb->nr_endpoints++; in musb_read_fifosize()
473 musb->epmask |= (1 << epnum); in musb_read_fifosize()
490 static inline void musb_configure_ep0(struct musb *musb) in musb_configure_ep0() argument
492 musb->endpoints[0].max_packet_sz_tx = MUSB_EP0_FIFOSIZE; in musb_configure_ep0()
493 musb->endpoints[0].max_packet_sz_rx = MUSB_EP0_FIFOSIZE; in musb_configure_ep0()
494 musb->endpoints[0].is_shared_fifo = true; in musb_configure_ep0()
502 extern void musb_start(struct musb *musb);
504 extern int musb_start(struct musb *musb);
506 extern void musb_stop(struct musb *musb);
511 extern void musb_load_testpacket(struct musb *);
513 extern irqreturn_t musb_interrupt(struct musb *);
515 extern void musb_hnp_stop(struct musb *musb);
517 static inline void musb_platform_set_vbus(struct musb *musb, int is_on) in musb_platform_set_vbus() argument
519 if (musb->ops->set_vbus) in musb_platform_set_vbus()
520 musb->ops->set_vbus(musb, is_on); in musb_platform_set_vbus()
524 static inline void musb_platform_enable(struct musb *musb) in musb_platform_enable() argument
526 if (musb->ops->enable) in musb_platform_enable()
527 musb->ops->enable(musb); in musb_platform_enable()
530 static inline int musb_platform_enable(struct musb *musb) in musb_platform_enable() argument
532 if (!musb->ops->enable) in musb_platform_enable()
535 return musb->ops->enable(musb); in musb_platform_enable()
539 static inline void musb_platform_disable(struct musb *musb) in musb_platform_disable() argument
541 if (musb->ops->disable) in musb_platform_disable()
542 musb->ops->disable(musb); in musb_platform_disable()
545 static inline int musb_platform_set_mode(struct musb *musb, u8 mode) in musb_platform_set_mode() argument
547 if (!musb->ops->set_mode) in musb_platform_set_mode()
550 return musb->ops->set_mode(musb, mode); in musb_platform_set_mode()
553 static inline void musb_platform_try_idle(struct musb *musb, in musb_platform_try_idle() argument
556 if (musb->ops->try_idle) in musb_platform_try_idle()
557 musb->ops->try_idle(musb, timeout); in musb_platform_try_idle()
560 static inline int musb_platform_get_vbus_status(struct musb *musb) in musb_platform_get_vbus_status() argument
562 if (!musb->ops->vbus_status) in musb_platform_get_vbus_status()
565 return musb->ops->vbus_status(musb); in musb_platform_get_vbus_status()
568 static inline int musb_platform_init(struct musb *musb) in musb_platform_init() argument
570 if (!musb->ops->init) in musb_platform_init()
573 return musb->ops->init(musb); in musb_platform_init()
576 static inline int musb_platform_exit(struct musb *musb) in musb_platform_exit() argument
578 if (!musb->ops->exit) in musb_platform_exit()
581 return musb->ops->exit(musb); in musb_platform_exit()
585 struct musb *