aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 1d3a67523ffc..317d8925387c 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -477,8 +477,8 @@ struct usb_gadget_ops {
477 * driver setup() requests 477 * driver setup() requests
478 * @ep_list: List of other endpoints supported by the device. 478 * @ep_list: List of other endpoints supported by the device.
479 * @speed: Speed of current connection to USB host. 479 * @speed: Speed of current connection to USB host.
480 * @is_dualspeed: True if the controller supports both high and full speed 480 * @max_speed: Maximal speed the UDC can handle. UDC must support this
481 * operation. If it does, the gadget driver must also support both. 481 * and all slower speeds.
482 * @is_otg: True if the USB device port uses a Mini-AB jack, so that the 482 * @is_otg: True if the USB device port uses a Mini-AB jack, so that the
483 * gadget driver must provide a USB OTG descriptor. 483 * gadget driver must provide a USB OTG descriptor.
484 * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable 484 * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable
@@ -518,7 +518,7 @@ struct usb_gadget {
518 struct usb_ep *ep0; 518 struct usb_ep *ep0;
519 struct list_head ep_list; /* of usb_ep */ 519 struct list_head ep_list; /* of usb_ep */
520 enum usb_device_speed speed; 520 enum usb_device_speed speed;
521 unsigned is_dualspeed:1; 521 enum usb_device_speed max_speed;
522 unsigned is_otg:1; 522 unsigned is_otg:1;
523 unsigned is_a_peripheral:1; 523 unsigned is_a_peripheral:1;
524 unsigned b_hnp_enable:1; 524 unsigned b_hnp_enable:1;
@@ -549,7 +549,7 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
549static inline int gadget_is_dualspeed(struct usb_gadget *g) 549static inline int gadget_is_dualspeed(struct usb_gadget *g)
550{ 550{
551#ifdef CONFIG_USB_GADGET_DUALSPEED 551#ifdef CONFIG_USB_GADGET_DUALSPEED
552 /* runtime test would check "g->is_dualspeed" ... that might be 552 /* runtime test would check "g->max_speed" ... that might be
553 * useful to work around hardware bugs, but is mostly pointless 553 * useful to work around hardware bugs, but is mostly pointless
554 */ 554 */
555 return 1; 555 return 1;
@@ -567,7 +567,7 @@ static inline int gadget_is_superspeed(struct usb_gadget *g)
567{ 567{
568#ifdef CONFIG_USB_GADGET_SUPERSPEED 568#ifdef CONFIG_USB_GADGET_SUPERSPEED
569 /* 569 /*
570 * runtime test would check "g->is_superspeed" ... that might be 570 * runtime test would check "g->max_speed" ... that might be
571 * useful to work around hardware bugs, but is mostly pointless 571 * useful to work around hardware bugs, but is mostly pointless
572 */ 572 */
573 return 1; 573 return 1;
@@ -760,7 +760,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
760/** 760/**
761 * struct usb_gadget_driver - driver for usb 'slave' devices 761 * struct usb_gadget_driver - driver for usb 'slave' devices
762 * @function: String describing the gadget's function 762 * @function: String describing the gadget's function
763 * @speed: Highest speed the driver handles. 763 * @max_speed: Highest speed the driver handles.
764 * @setup: Invoked for ep0 control requests that aren't handled by 764 * @setup: Invoked for ep0 control requests that aren't handled by
765 * the hardware level driver. Most calls must be handled by 765 * the hardware level driver. Most calls must be handled by
766 * the gadget driver, including descriptor and configuration 766 * the gadget driver, including descriptor and configuration
@@ -824,7 +824,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
824 */ 824 */
825struct usb_gadget_driver { 825struct usb_gadget_driver {
826 char *function; 826 char *function;
827 enum usb_device_speed speed; 827 enum usb_device_speed max_speed;
828 void (*unbind)(struct usb_gadget *); 828 void (*unbind)(struct usb_gadget *);
829 int (*setup)(struct usb_gadget *, 829 int (*setup)(struct usb_gadget *,
830 const struct usb_ctrlrequest *); 830 const struct usb_ctrlrequest *);