From: Felipe Balbi <balbi@kernel.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: "gregkh\@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-renesas-soc\@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH 1/4] usb: gadget: udc: renesas_usb3: add sysfs "role" to set "b-device" mode
Date: Wed, 29 Mar 2017 08:52:12 +0300 [thread overview]
Message-ID: <87d1d0fx4j.fsf@linux.intel.com> (raw)
In-Reply-To: <PS1PR06MB1692F6A720410D53A6972379D8350@PS1PR06MB1692.apcprd06.prod.outlook.com>
Hi,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> writes:
> Hi Felipe-san,
>
>> From: Felipe Balbi, Sent: Tuesday, March 28, 2017 9:06 PM
>>
>> Hi,
>>
>> Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> writes:
>> > Sadly, to change the role ("host" and "peripheral") of USB3.0 DRD
>> > controller on R-Car Gen3, software has to set the DRD_CON register
>> > which is included in a usb3.0 peripheral controler's register.
>> > To simply implementation, the previous code always set peripheral mode
>> > as hardcoded. However, to support usb role swap in the future,
>> > the hardcoded is not good. So, this patch adds sysfs "role" to set
>> > the mode by a user.
>> > After applied this patch, since the DRD controller will act as host
>> > mode after probed, a user needs to change the mode via the sysfs.
>> >
>> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>>
>> in patch 3, you add extcon to monitor ID and VBUS pins. Do you really
>> need this sysfs file at all?
>
> Yes. This is because this "role" sysfs file cannot monitor the ID and VBUS pins.
> The "role" only monitors the mode which is "host" or "peripheral".
Right, I understand it can't monitor the state of ID/VBUS, but do you
have a usecase for that file that's not covered by the other patches in
the series? :-)
If you want to force renesas controller to peripheral mode, then
shouldn't you use dr-mode device_property() instead?
--
balbi
next prev parent reply other threads:[~2017-03-29 5:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 11:53 [PATCH 0/4] usb: gadget: udc: renesas_usb3: add USB3.0 DRD support Yoshihiro Shimoda
2017-03-28 11:53 ` [PATCH 1/4] usb: gadget: udc: renesas_usb3: add sysfs "role" to set "b-device" mode Yoshihiro Shimoda
2017-03-28 12:06 ` Felipe Balbi
2017-03-29 2:00 ` Yoshihiro Shimoda
2017-03-29 5:52 ` Felipe Balbi [this message]
2017-03-29 7:24 ` Yoshihiro Shimoda
2017-03-29 8:03 ` Felipe Balbi
2017-03-29 8:39 ` Yoshihiro Shimoda
2017-03-28 11:53 ` [PATCH 2/4] usb: gadget: udc: add USB ID signal monitoring Yoshihiro Shimoda
2017-03-28 11:53 ` [PATCH 3/4] usb: gadget: udc: renesas_usb3: add extcon support Yoshihiro Shimoda
2017-03-28 11:53 ` [PATCH 4/4] usb: gadget: udc: renesas_usb3: add support for usb role swap 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=87d1d0fx4j.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.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