aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2011-01-25 16:45:35 +0530
committerHenrik Öhman <henrik.ohman@stericsson.com>2011-03-07 10:16:28 +0100
commit534c198a0b20c2330a76accd434be93c0004e660 (patch)
tree9f4e30526a74578209ced99b4c9e9c07f496b9e5 /include
parent29372ff1386b6d316a37b0a41a382a8c161f160f (diff)
USB:Adding support for OTG 1.3 and OTG 2.0 compliance
Added missing support for OTG 1.3 compliance for OPT and OTG 2.0 support For 2.0 added the following: HNP Polling ADP Test modes ST-Ericsson ID:WP 274506 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10054 Change-Id: I6bc94b004dd5e39f26c440a0a4bf18725b31ea12 Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13241 Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Tested-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/ch9.h10
2 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index f4f6ef34998..cc54b7282b1 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -314,8 +314,10 @@ struct usb_bus {
u8 otg_port; /* 0, or number of OTG/HNP port */
unsigned is_b_host:1; /* true during some HNP roleswitches */
unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
+#ifdef CONFIG_USB_OTG_20
unsigned hnp_support:1; /* OTG: HNP is supported on OTG port */
struct delayed_work hnp_polling;/* OTG: HNP polling work */
+#endif
unsigned sg_tablesize; /* 0 or largest number of sg list entries */
int devnum_next; /* Next open device number in
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 14e75cb857f..7d26ca8e61c 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -125,11 +125,12 @@
#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
-
+#ifdef CONFIG_USB_OTG_20
/* OTG 2.0 spec 6.2 and 6.3 sections */
#define OTG_STATUS_SELECTOR 0xF000
#define THOST_REQ_POLL 1500 /* 1000 - 2000 msec */
#define HOST_REQUEST_FLAG 0
+#endif
/**
* struct usb_ctrlrequest - SETUP data for a USB device control request
@@ -590,15 +591,20 @@ struct usb_otg_descriptor {
__u8 bLength;
__u8 bDescriptorType;
+#ifndef CONFIG_USB_OTG_20
+ __u8 bmAttributes; /* support for HNP, SRP, etc */
+#else
__u8 bmAttributes; /* support for HNP, SRP, ADP etc */
__le16 bcdOTG;
+#endif
} __attribute__ ((packed));
/* from usb_otg_descriptor.bmAttributes */
#define USB_OTG_SRP (1 << 0)
#define USB_OTG_HNP (1 << 1) /* swap host/device roles */
+#ifdef CONFIG_USB_OTG_20
#define USB_OTG_ADP (1 << 2) /* Attach detection protocol*/
-
+#endif
/*-------------------------------------------------------------------------*/
/* USB_DT_DEBUG: for special highspeed devices, replacing serial console */