diff options
author | Gregory Herrero <gregory.herrero@intel.com> | 2015-01-30 09:09:28 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-30 10:30:44 -0600 |
commit | 9e14d0a566f48d33a9253096963b3b8199e4df57 (patch) | |
tree | 22e316e69be3e2b907a758ee64914782b3a20696 /drivers/usb/dwc2/core.h | |
parent | c00dd4a6ec20a58ed38be85f8e47efda40625f17 (diff) | |
download | kernel_replicant_linux-9e14d0a566f48d33a9253096963b3b8199e4df57.tar.gz kernel_replicant_linux-9e14d0a566f48d33a9253096963b3b8199e4df57.tar.bz2 kernel_replicant_linux-9e14d0a566f48d33a9253096963b3b8199e4df57.zip |
usb: dwc2: gadget: add TEST_MODE feature support
Handle SET_FEATURE TEST_MODE request sent by the host.
Slightly rework FEATURE request handling to allow parsing
other request types than Endpoint.
Also add a debugfs to change test mode value from user space.
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r-- | drivers/usb/dwc2/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index f09b3deffdee..c750fd3d88b3 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -567,12 +567,14 @@ struct dwc2_hw_params { * @num_of_eps: Number of available EPs (excluding EP0) * @debug_root: Root directrory for debugfs. * @debug_file: Main status file for debugfs. + * @debug_testmode: Testmode status file for debugfs. * @debug_fifo: FIFO status file for debugfs. * @ep0_reply: Request used for ep0 reply. * @ep0_buff: Buffer for EP0 reply data, if needed. * @ctrl_buff: Buffer for EP0 control requests. * @ctrl_req: Request for EP0 control packets. * @ep0_state: EP0 control transfers state + * @test_mode: USB test mode requested by the host * @last_rst: Time of last reset * @eps: The endpoints being supplied to the gadget framework * @g_using_dma: Indicate if dma usage is enabled @@ -610,6 +612,7 @@ struct dwc2_hsotg { struct dentry *debug_root; struct dentry *debug_file; + struct dentry *debug_testmode; struct dentry *debug_fifo; /* DWC OTG HW Release versions */ @@ -706,6 +709,7 @@ struct dwc2_hsotg { void *ep0_buff; void *ctrl_buff; enum dwc2_ep0_state ep0_state; + u8 test_mode; struct usb_gadget gadget; unsigned int enabled:1; |