Messages in this thread | | | Date | Wed, 6 Aug 2014 15:13:35 -0700 | Subject | Re: [PATCH v3 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting | From | Doug Anderson <> |
| |
Paul,
On Tue, Aug 5, 2014 at 1:08 PM, Paul Zimmerman <Paul.Zimmerman@synopsys.com> wrote: >> Maybe dwc2 is refer to the Kconfig in dwc3 for there is a choice from >> one of "Host only mode", "Gadget only mode" and "Dual Role mode", >> which means the role is decided by the Kconfig. >> >> In my opinion, there maybe more than one controller in a Soc, and for >> different >> usage, the mode select should not be done in Kconfig, it's better to do that >> in dts file. >> I agree with you that the CONFIG_USB_DWC2_HOST should defined for host >> functionality, not for role definition. >> >> Paul: what do you think? > > I'm confused about how your dual-role mode implementation is supposed > to work. Right now, the host and peripheral modes are compiled as > separate drivers, and there is no dual-role mode in the Kconfig. So I > don't see how your code can work. Have you tested it?
Ah, interesting. I just assumed that since you could compile both in that dual mode was there, but I clearly was confused.
I don't think Kever had tested dual_role mode.
> Dinh Nguyen is working on a patch series to add dual-role support, I > think you have seen that, right? That adds the Kconfig options for all > three modes. Maybe you should build on top of that?
I hadn't personally seen it, but now I have! I guess this is the newest <https://www.mail-archive.com/linux-usb@vger.kernel.org/msg46103.html>.
I haven't done a thorough review, but I think Kever's patch v4 <https://patchwork.kernel.org/patch/4682711/> is still relevant since I don't see anything parsing the dr_mode in Dinh's patches.
-Doug
| |