RE: [PATCH 1/4] usb: gadget: udc: renesas_usb3: add sysfs "role" to set "b-device" mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> writes:
> Hi Felipe-san,
>
>> From: Felipe Balbi, Sent: Tuesday, March 28, 2017 9:06 PM
>> 
>> Hi,
>> 
>> Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> 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@xxxxxxxxxxx>
>> 
>> 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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux