Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1414545

RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

From Jun Li <jun.li@nxp.com>
Newsgroups linux.kernel
Subject RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux
Date 2016-06-06 03:10 +0200
Message-ID <rGRdf-5Qc-3@gated-at.bofh.it> (permalink)
References (3 earlier) <rFZPz-5sI-23@gated-at.bofh.it> <rG9Ff-30C-1@gated-at.bofh.it> <rGAcp-3pe-1@gated-at.bofh.it> <rGBLb-4qM-7@gated-at.bofh.it> <rGBUR-4tT-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



> -----Original Message-----
> From: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> Sent: Sunday, June 05, 2016 4:47 PM
> To: Jun Li <jun.li@nxp.com>; Peter Chen <hzpeterchen@gmail.com>
> Cc: felipe.balbi@linux.intel.com; Mathias Nyman <mathias.nyman@intel.com>;
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Lee Jones
> <lee.jones@linaro.org>; Heikki Krogerus <heikki.krogerus@linux.intel.com>;
> Liam Girdwood <lgirdwood@gmail.com>; Mark Brown <broonie@kernel.org>;
> linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Roger Quadros
> <rogerq@ti.com>
> Subject: Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port
> mux
> 
> Hi,
> 
> On 06/05/2016 04:33 PM, Jun Li wrote:
> >> Port mux is part of dual role switch, but not the whole thing.
> >> >
> >> > Dual role switch includes at least below things:
> >> >  - ID or type-C event detection
> >> >  - port mux
> >> >  - VBUS management
> >> >  - start/stop host/device controllers
> >> >
> >> > An OTG/Dual-role framework can be used to keep all these things run
> >> > together with an internal state machine. But it's not duplicated
> >> > with a generic framework for port mux and the port mux drivers.
> >> >
> >>> > > Your
> >>> > > case is just like Renesas case, which uses two different drivers
> >>> > > between peripheral and host[1].
> >> >
> >> > In my case, the port mux devices are physical devices and they can
> >> > be controlled through GPIO pins or device registers. They are
> >> > independent of both peripheral and host controllers.
> >> >
> > I also think current OTG/Dual role framework can support your case, if
> > you find there is any limitation of it which can't meet your
> > requirement, we should improve it, Roger also provide an example of
> > dual role switch with
> > USB3 based on his OTG core.
> 
> Why do we need an OTG framework to support a device driver?

Currently there are many controller drivers which are dual role
capable, all has its specific approach/implementation, your case
is another one, actually there are common part we can share and
reuse, Roger is introducing a common framework which cooperates
into usb core and udc-core. With that, each OTG/dual role user
only need take care of its small specific part.
  
> Is it something like a bus or class driver?

It's not actually a driver, instead, it's more like a lib or
helper routines. You just need register your host and gadget
into OTG core, and define the ops routines if required, OTG state
machine will help you do the switch.

Li Jun
 
> 
> Best regards,
> Lu Baolu

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-02 03:40 +0200
  Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-03 09:50 +0200
    Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-06-03 10:20 +0200
      Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-03 11:30 +0200
    Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-03 18:10 +0200
      Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-04 04:40 +0200
        Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-05 09:00 +0200
          RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-05 10:40 +0200
            Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-05 10:50 +0200
              RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-06 03:10 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 04:40 +0200
              Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 04:20 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 04:50 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 09:00 +0200
          Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 03:40 +0200
            Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 05:10 +0200
              Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 09:10 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 09:40 +0200
              Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-06 09:10 +0200
                RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-07 05:20 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-07 08:30 +0200
                RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-07 09:10 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-07 11:30 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-07 14:50 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-07 12:00 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-07 15:00 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-06-07 15:10 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-07 16:10 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-06-07 17:10 +0200
                RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-08 05:10 +0200
                RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-08 08:30 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-08 08:40 +0200
                Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-08 10:00 +0200

csiph-web