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 1/3] usb: renesas_usbhs: simplify usbhs_status_get_device_state()
Date: Tue, 10 Sep 2019 04:41:52 +0000 [thread overview]
Message-ID: <TYAPR01MB45441B261C2EA251DED6E606D8B60@TYAPR01MB4544.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <1568043974-1236-1-git-send-email-external.veeraiyan.c@de.adit-jv.com>
Hi Veeraiyan,
> From: Veeraiyan Chidambaram, Sent: Tuesday, September 10, 2019 12:46 AM
<snip>
>
> Similar to usbhs_status_get_ctrl_stage(), *_get_device_state() is not
> supposed to return any error code since its return value is the DVSQ
> bitfield of the INTSTS0 register. According to SoC HW manual rev1.00,
> every single value of DVSQ[2:0] is valid and none is an error:
>
> ----8<----
> Device State
> 000: Powered state
> 001: Default state
> 010: Address state
> 011: Configuration state
> 1xx: Suspended state
> ----8<----
>
> Hence, simplify the function body. The motivation behind dropping the
> switch/case construct is being able to implement reading the suspended
> state. The latter (based on the above DVSQ[2:0] description) doesn't
> have a unique value, but is rather a list of states (which makes
> switch/case less suitable for reading/validating it):
>
> 100: (Suspended) Powered state
> 101: (Suspended) Default state
> 110: (Suspended) Address state
> 111: (Suspended) Configuration state
>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> Signed-off-by: Veeraiyan Chidambaram <veeraiyan.chidambaram@in.bosch.com>
Thank you for the patch!
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Best regards,
Yoshihiro Shimoda
prev parent reply other threads:[~2019-09-10 4:41 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
2019-09-10 4:41 ` Yoshihiro Shimoda [this message]
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=TYAPR01MB45441B261C2EA251DED6E606D8B60@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).