Lines Matching refs:gadget
541 static inline void set_gadget_data(struct usb_gadget *gadget, void *data) in set_gadget_data() argument
542 { dev_set_drvdata(&gadget->dev, data); } in set_gadget_data()
543 static inline void *get_gadget_data(struct usb_gadget *gadget) in get_gadget_data() argument
544 { return dev_get_drvdata(&gadget->dev); } in get_gadget_data()
551 #define gadget_for_each_ep(tmp, gadget) \ argument
552 list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
612 static inline int usb_gadget_frame_number(struct usb_gadget *gadget) in usb_gadget_frame_number() argument
614 return gadget->ops->get_frame(gadget); in usb_gadget_frame_number()
630 static inline int usb_gadget_wakeup(struct usb_gadget *gadget) in usb_gadget_wakeup() argument
632 if (!gadget->ops->wakeup) in usb_gadget_wakeup()
634 return gadget->ops->wakeup(gadget); in usb_gadget_wakeup()
646 static inline int usb_gadget_set_selfpowered(struct usb_gadget *gadget) in usb_gadget_set_selfpowered() argument
648 if (!gadget->ops->set_selfpowered) in usb_gadget_set_selfpowered()
650 return gadget->ops->set_selfpowered(gadget, 1); in usb_gadget_set_selfpowered()
663 static inline int usb_gadget_clear_selfpowered(struct usb_gadget *gadget) in usb_gadget_clear_selfpowered() argument
665 if (!gadget->ops->set_selfpowered) in usb_gadget_clear_selfpowered()
667 return gadget->ops->set_selfpowered(gadget, 0); in usb_gadget_clear_selfpowered()
683 static inline int usb_gadget_vbus_connect(struct usb_gadget *gadget) in usb_gadget_vbus_connect() argument
685 if (!gadget->ops->vbus_session) in usb_gadget_vbus_connect()
687 return gadget->ops->vbus_session(gadget, 1); in usb_gadget_vbus_connect()
702 static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) in usb_gadget_vbus_draw() argument
704 if (!gadget->ops->vbus_draw) in usb_gadget_vbus_draw()
706 return gadget->ops->vbus_draw(gadget, mA); in usb_gadget_vbus_draw()
720 static inline int usb_gadget_vbus_disconnect(struct usb_gadget *gadget) in usb_gadget_vbus_disconnect() argument
722 if (!gadget->ops->vbus_session) in usb_gadget_vbus_disconnect()
724 return gadget->ops->vbus_session(gadget, 0); in usb_gadget_vbus_disconnect()
738 static inline int usb_gadget_connect(struct usb_gadget *gadget) in usb_gadget_connect() argument
740 if (!gadget->ops->pullup) in usb_gadget_connect()
742 return gadget->ops->pullup(gadget, 1); in usb_gadget_connect()
760 static inline int usb_gadget_disconnect(struct usb_gadget *gadget) in usb_gadget_disconnect() argument
762 if (!gadget->ops->pullup) in usb_gadget_disconnect()
764 return gadget->ops->pullup(gadget, 0); in usb_gadget_disconnect()
890 extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget);
891 extern void usb_del_gadget_udc(struct usb_gadget *gadget);
955 extern int usb_gadget_map_request(struct usb_gadget *gadget,
958 extern void usb_gadget_unmap_request(struct usb_gadget *gadget,