[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160608062509.GB5309@shlinux2>
Date: Wed, 8 Jun 2016 14:25:09 +0800
From: Peter Chen <hzpeterchen@...il.com>
To: Felipe Balbi <felipe.balbi@...ux.intel.com>
Cc: Roger Quadros <rogerq@...com>, Lu Baolu <baolu.lu@...ux.intel.com>,
Jun Li <jun.li@....com>,
Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lee Jones <lee.jones@...aro.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux
On Tue, Jun 07, 2016 at 06:05:25PM +0300, Felipe Balbi wrote:
>
> Hi,
>
> Roger Quadros <rogerq@...com> writes:
> >> I might be able to find some time to implement a proof of concept which
> >> would allow your platforms to get dual-role with code we already have,
> >> but I need DWC3's OTG support which, I'm assuming, you already have :-)
> >>
> >> If you wanna try something offline, just ping me ;-) I'll be happy to
> >> help.
> >
> > What you are proposing is a dwc3 only solution. With the otg/dual-role
> > series we are trying to be generic as much as possible.
>
> Well, if there is a need for that, sure. Take MUSB for instance. It
> makes use of nothing of the sorts, because it doesn't have to.
>
Indeed, some centralized IP drivers like MUSB, chipidea, dwc3 do not
need this framework for role switch. But there are some common stuffs,
like OTG FSM (fully/simplified), manage roles and sysfs for role switch,
these things can be in a framework, the purpose of this framework is
easy for dual-role switch function.
Besides, when the host and device driver are in different folders for
platform, eg host/ and gadget/udc/, a role switch driver is needed if
we need dual role function.
Recently, the dual-role function is more and more common for USB, a
framework can avoid duplicated work and let switch be standardized.
> > Whether controller drivers want to use it or not is upto the driver
> > maintainers but we should at least ensure that user space ABI if any,
> > is consistent across different implementations.
>
> Role decisions should not be exposed to userspace unless as debug
> feature (using e.g. DebugFS). That should be done either by the HW or
> within the kernel.
>
> If we're discussing userspace ABI here, there's something very wrong
> with OTG/DRD layer design.
Currently, there are some use cases which need to switch role on the
fly (will be more for type-c in future), a sysfs for role switch is
necessary.
--
Best Regards,
Peter Chen
Powered by blists - more mailing lists