aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2011-01-25 14:53:59 +0530
committerHenrik Öhman <henrik.ohman@stericsson.com>2011-03-09 09:58:02 +0100
commit44a9f836cfea61746c60311b98ff6291fd099549 (patch)
treeed758525408c72f35aa0297577633176f5a97ab7 /include
parentf91c44a9a26b271026f5942dbcedf35f369d6397 (diff)
USB: core: OTG Supplement Revision 2.0 updates
OTG supplement revision 2.0 spec introduces Attach Detection Protocol(ADP) for detecting peripheral connection without applying power on VBUS. ADP is optional and is included in the OTG descriptor along with SRP and HNP. HNP polling is introduced for peripheral to notify its wish to become host. Host polls (GET_STATUS on DEVICE) peripheral for host_request and suspend the bus when peripheral returns host_request TRUE. The spec insists the polling frequency to be in 1-2 sec range and bus should be suspended with in 2 sec from host_request is set. a_alt_hnp_support feature is obsolete and a_hnp_support feature is limited to only legacy OTG B-device. The newly introduced bcdOTG field in the OTG descriptor is used for identifying the 2.0 compliant B-device. Signed-off-by: Pavankumar Kondeti <pkondeti@...> Change-Id: I437110def5a1c40a857bae9ffb739ee27f1e3fc9 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/14266 Tested-by: Sakethram BOMMISETTI <sakethram.bommisetti@stericsson.com> Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: QATOOLS
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/ch9.h10
2 files changed, 2 insertions, 10 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index cc54b7282b1..f4f6ef34998 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -314,10 +314,8 @@ 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 7d26ca8e61c..14e75cb857f 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -125,12 +125,11 @@
#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
@@ -591,20 +590,15 @@ 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 */