Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8486a0bb authored by Macpaul Lin's avatar Macpaul Lin Committed by Felipe Balbi
Browse files

usb: add usb_otg20_descriptor for OTG 2.0 and above



OTG 2.0 introduces bcdOTG in otg descriptor to identify the OTG and EH
supplement release number with which the OTG device is compliant, this
patch adds structure usb_otg20_descriptor for OTG 2.0 and above.

Signed-off-by: default avatarMacpaul Lin <macpaul@gmail.com>
Signed-off-by: default avatarLi Jun <jun.li@freescale.com>
Reviewed-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent d91de093
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -674,6 +674,17 @@ struct usb_otg_descriptor {
	__u8  bmAttributes;	/* support for HNP, SRP, etc */
	__u8  bmAttributes;	/* support for HNP, SRP, etc */
} __attribute__ ((packed));
} __attribute__ ((packed));


/* USB_DT_OTG (from OTG 2.0 supplement) */
struct usb_otg20_descriptor {
	__u8  bLength;
	__u8  bDescriptorType;

	__u8  bmAttributes;	/* support for HNP, SRP and ADP, etc */
	__le16 bcdOTG;		/* OTG and EH supplement release number
				 * in binary-coded decimal(i.e. 2.0 is 0200H)
				 */
} __attribute__ ((packed));

/* from usb_otg_descriptor.bmAttributes */
/* from usb_otg_descriptor.bmAttributes */
#define USB_OTG_SRP		(1 << 0)
#define USB_OTG_SRP		(1 << 0)
#define USB_OTG_HNP		(1 << 1)	/* swap host/device roles */
#define USB_OTG_HNP		(1 << 1)	/* swap host/device roles */