From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Veeraiyan Chidambaram <external.veeraiyan.c@de.adit-jv.com>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
Andrew Gabbasov <andrew_gabbasov@mentor.com>,
"REE erosca@DE.ADIT-JV.COM" <erosca@DE.ADIT-JV.COM>,
Veeraiyan Chidambaram <veeraiyan.chidambaram@in.bosch.com>
Subject: RE: [PATCH v4 3/3] usb: renesas_usbhs: add suspend event support in gadget mode
Date: Tue, 10 Sep 2019 04:47:04 +0000 [thread overview]
Message-ID: <TYAPR01MB4544BDE02C5BEC2D032C85F1D8B60@TYAPR01MB4544.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <1568043974-1236-3-git-send-email-external.veeraiyan.c@de.adit-jv.com>
Hi Veeraiyan,
> From: Veeraiyan Chidambaram, Sent: Tuesday, September 10, 2019 12:46 AM
<snip>
>
> 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>
Thank you for the patch!
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
And, I tested this patch on my environment [1] and works correctly. So,
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
[1]
- Two R-Car Gen3 boards.
- Connected a usb cable to each CN9.
-- Use g_mass_storage.ko.
Best regards,
Yoshihiro Shimoda
next prev parent reply other threads:[~2019-09-10 4:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 15:46 [PATCH v4 1/3] usb: renesas_usbhs: simplify usbhs_status_get_device_state() Veeraiyan Chidambaram
2019-09-09 15:46 ` [PATCH v4 2/3] usb: renesas_usbhs: enable DVSE interrupt Veeraiyan Chidambaram
2019-09-10 4:45 ` Yoshihiro Shimoda
2019-09-10 9:31 ` veeraiyan chidambaram
2019-09-11 2:45 ` Yoshihiro Shimoda
2019-09-11 13:22 ` veeraiyan chidambaram
2019-09-09 15:46 ` [PATCH v4 3/3] usb: renesas_usbhs: add suspend event support in gadget mode Veeraiyan Chidambaram
2019-09-10 4:47 ` Yoshihiro Shimoda [this message]
2019-09-10 4:41 ` [PATCH v4 1/3] usb: renesas_usbhs: simplify usbhs_status_get_device_state() Yoshihiro Shimoda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=TYAPR01MB4544BDE02C5BEC2D032C85F1D8B60@TYAPR01MB4544.jpnprd01.prod.outlook.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=andrew_gabbasov@mentor.com \
--cc=balbi@kernel.org \
--cc=erosca@DE.ADIT-JV.COM \
--cc=external.veeraiyan.c@de.adit-jv.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=veeraiyan.chidambaram@in.bosch.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).