Add ADP, HNP, and SRP feature options to gadget structure. Signed-off-by: Macpaul Lin <macpaul@xxxxxxxxx> --- changes for v2: - no change changes for v3: - no change changes for v4: - fix description of each git commits. include/linux/usb/gadget.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index c63a8db..6e44483 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -516,6 +516,12 @@ struct usb_gadget_ops { * gadget driver must provide a USB OTG descriptor. * @is_otg20: True if the USB hardware supports OTG 2.0 specification. * The gadget driver must provide USB OTG 2.0 descriptor. + * @adp_support: OTG device feature flag, indicating that the device + * supports ADP at this port. + * @hnp_support: OTG device feature flag, indicating that the device + * supports HNP at this port. + * @srp_support: OTG device feature flag, indicating that the device + * supports SRP at this port. * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable * is in the Mini-AB jack, and HNP has been used to switch roles * so that the "A" device currently acts as A-Peripheral, not A-Host. @@ -565,6 +571,9 @@ struct usb_gadget { unsigned sg_supported:1; unsigned is_otg:1; unsigned is_otg20:1; + unsigned adp_support:1; + unsigned hnp_support:1; + unsigned srp_support:1; unsigned is_a_peripheral:1; unsigned b_hnp_enable:1; unsigned a_hnp_support:1; -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html