USB: core: Add support for OTG automated compliance tests

1. Add OTG PET device to TPL. OTG device shall support this
device for allowing compliance automated testing.

2. Add otg_srp_reqd filed to gadget. OTG B-device shall enable
this flag when OTG PET (Protocol and Electrical Tester) that
acts as A-device sends Set Feature TEST_MODE with wIndex high
byte value = 0x06.  OTG PET expects B-device to initiate SRP
after the end of current session.

3. Add otg_vbus_off to usb_bus.  USB core enables this flag
when OTG PET enumerates with bcdDevice[0] field in its Device
Descriptor is equal to 1.  OTG PET expects A-device to turn off
the VBUS with in 5 sec of its disconnection which allows it to
initiate SRP.

3. Add support to identify OTG PET and start HNP quickly.

Change-Id: Ib1f4d835d00ca29ff8f980c94d75a3890507dedc
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This commit is contained in:
Vijayavardhan Vennapusa
2012-01-18 14:16:55 +05:30
committed by Stephen Boyd
parent b5c6df35f6
commit 2210347c11
7 changed files with 37 additions and 0 deletions

View File

@@ -332,6 +332,13 @@ struct usb_bus {
unsigned is_b_host:1; /* true during some HNP roleswitches */
unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
unsigned hnp_support:1; /* OTG: HNP is supported on OTG port */
unsigned quick_hnp:1; /* OTG: Indiacates if hnp is required
irrespective of host_request flag
*/
unsigned otg_vbus_off:1; /* OTG: OTG test device feature bit that
* tells A-device to turn off VBUS after
* B-device is disconnected.
*/
struct delayed_work hnp_polling;/* OTG: HNP polling work */
unsigned sg_tablesize; /* 0 or largest number of sg list entries */