summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-06-17 09:25:01 +0800
committerLi Jun <jun.li@freescale.com>2015-07-22 10:22:08 +0800
commitccb2028f1652b5dc3124a9d569a1089af40178ed (patch)
treead19a19541cfea1ca14059f4af58a143d2f6d3bd /include
parent5acb619fb97bab8ff6111006fd40439a63958688 (diff)
MLK-11123-3 usb: otg: add usb_otg_caps structure for otg capabilities
This patch adds a structure usb_otg_caps to cover all otg related capabilities of the device, including otg revision, and if hnp/srp/adp is supported. Signed-off-by: Li Jun <jun.li@freescale.com> (cherry picked from commit 87ebfda21aabd0c4ca9001045533f89b1c01bda5)
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/otg.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 52661c5da690..bd1dcf816100 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -41,6 +41,21 @@ struct usb_otg {
};
+/**
+ * struct usb_otg_caps - describes the otg capabilities of the device
+ * @otg_rev: The OTG revision number the device is compliant with, it's
+ * in binary-coded decimal (i.e. 2.0 is 0200H).
+ * @hnp_support: Indicates if the device supports HNP.
+ * @srp_support: Indicates if the device supports SRP.
+ * @adp_support: Indicates if the device supports ADP.
+ */
+struct usb_otg_caps {
+ u16 otg_rev;
+ bool hnp_support;
+ bool srp_support;
+ bool adp_support;
+};
+
extern const char *usb_otg_state_string(enum usb_otg_state state);
/* Context: can sleep */