Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
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 11:03:07 +0300	[thread overview]
Message-ID: <87inmsldc4.fsf@linux.intel.com> (raw)
In-Reply-To: <PS1PR06MB1692C364D1D62FB487BD12F5D8350@PS1PR06MB1692.apcprd06.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]


Yoshihiro-san

Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> writes:
>> >> 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? :-)
>
> Thank you for the comment. Since my English skill is not good,
> I don't understand your question.

oh, that's alright. I'll try to explain:

I'm asking if you have any situation where you need userspace to change
the role manually. I understand it's a very nice feature to have during
development because it frees us from searching for "the right cable";
but if the only application of this sysfs file is durinb development,
then perhaps it should be exposed using debugfs instead ;-)

Hopefully that's easier to understand now.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-03-29  8:03 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
2017-03-29  7:24         ` Yoshihiro Shimoda
2017-03-29  8:03           ` Felipe Balbi [this message]
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=87inmsldc4.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