linux_dsm_epyc7002/drivers/usb
Veeraiyan Chidambaram 39abcc8484 usb: renesas_usbhs: add suspend event support in gadget mode
When R-Car Gen3 USB 2.0 is in Gadget mode, if host is detached an interrupt
will be generated and Suspended state bit is set in interrupt status
register. Interrupt handler will call driver->suspend(composite_suspend)
if suspended state bit is set. composite_suspend will call
ffs_func_suspend which will post FUNCTIONFS_SUSPEND and will be consumed
by user space application via /dev/ep0.

To be able to detect host detach, extend the DVSQ_MASK to cover the
Suspended bit of the DVSQ[2:0] bitfield from the Interrupt Status
Register 0 (INTSTS0) register and perform appropriate action in the
DVST interrupt handler (usbhsg_irq_dev_state).

Without this commit, disconnection of the phone from R-Car-H3 ES2.0
Salvator-X CN9 port is not recognized and reverse role switch does
not happen. If phone is connected again it does not enumerate.

With this commit, disconnection will be recognized and reverse role
switch will happen by a user space application. If phone is connected
again it will enumerate properly and will become visible in the output
of 'lsusb'.

Signed-off-by: Veeraiyan Chidambaram <veeraiyan.chidambaram@in.bosch.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1568207756-22325-3-git-send-email-external.veeraiyan.c@de.adit-jv.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04 14:16:54 +02:00
..
atm USB: atm: cxacru: convert to use dev_groups 2019-08-09 07:55:45 +02:00
c67x00
cdns3 usb: cdns3: Remove redundant dev_err call in cdns3_probe() 2019-09-03 20:31:34 +02:00
chipidea usb: chipidea: tegra: clean up tegra_udc flag code 2019-10-04 14:15:13 +02:00
class Merge 5.3-rc7 into usb-next 2019-09-02 19:31:18 +02:00
common usb: common: add USB GPIO based connection detection driver 2019-09-03 19:01:04 +02:00
core LED updates for 5.4-rc1 2019-09-17 18:40:42 -07:00
dwc2 USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
dwc3 usb: Fix Kconfig indentation 2019-10-04 14:09:41 +02:00
early drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
gadget USB: gadget: udc: clean up an indentation issue 2019-10-04 14:09:42 +02:00
host USB: host: ohci-at91: resume: balance the clock start call 2019-10-04 14:16:53 +02:00
image scsi: usb: image: microtek: use sg helper to iterate over scatterlist 2019-06-20 15:21:32 -04:00
isp1760 usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
misc usb: ftdi-elan: move a couple of statements to next line 2019-10-04 14:09:42 +02:00
mon docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
mtu3 usb: mtu3: register a USB Role Switch for dual role mode 2019-09-03 20:02:15 +02:00
musb usb: musb: musb_gadget.c: Remove unused variable 2019-10-04 14:15:13 +02:00
phy usb: phy: keystone: use devm_platform_ioremap_resource() to simplify code 2019-10-04 14:09:41 +02:00
renesas_usbhs usb: renesas_usbhs: add suspend event support in gadget mode 2019-10-04 14:16:54 +02:00
roles USB changes for 5.4-rc1 2019-09-18 10:33:46 -07:00
serial usb: Fix Kconfig indentation 2019-10-04 14:09:41 +02:00
storage usb-storage: SCSI glue: use dev_err instead of printk 2019-10-02 13:11:08 +02:00
typec LED updates for 5.4-rc1 2019-09-17 18:40:42 -07:00
usbip usbip: clean up an indentation issue 2019-10-04 14:09:42 +02:00
Kconfig usb: common: create Kconfig file 2019-09-03 19:00:39 +02:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c usb: usb-skeleton: make comment block in line with coding style 2019-08-21 09:57:36 -07:00