Hi Felipe-san, > From: Felipe Balbi, Sent: Wednesday, March 29, 2017 5:03 PM > > Yoshihiro-san > > Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> writes: > >> >> 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? :-) > > > > 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. Thank you for the explanation! I understood this :) This "b-device" mode is totally for development purpose. - The old version SoC has a restriction (cannot monitor ID pin!), So even if a board has B connector, I should turn the mode to peripheral. - I would like to develop this driver using A connector on a board that is related to SoC and board environment specification :) So, I think this code is low priority thing for now. Thus, I will remove this patch 1 and rebase other patches and resubmit later today. Best regards, Yoshihiro Shimoda > -- > balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html