[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141024152553.GB26941@saruman>
Date: Fri, 24 Oct 2014 10:25:53 -0500
From: Felipe Balbi <balbi@...com>
To: Huang Rui <ray.huang@....com>
CC: Felipe Balbi <balbi@...com>,
Alan Stern <stern@...land.harvard.edu>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Paul Zimmerman <Paul.Zimmerman@...opsys.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Vincent Wan <vincent.wan@....com>, Tony Li <tony.li@....com>,
<linux-usb@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 05/16] usb: dwc3: add quirks support to be compatible
for kinds of SoCs
On Mon, Oct 20, 2014 at 02:02:17PM +0800, Huang Rui wrote:
> On Fri, Oct 17, 2014 at 09:41:44AM -0500, Felipe Balbi wrote:
> > HI,
> >
> > On Fri, Oct 17, 2014 at 04:53:30PM +0800, Huang Rui wrote:
> > > This patch adds a quirks flag at dwc3 structure, and SoCs platform vendor is
> > > able to define this flag in platform data at bus glue layer. Then do some
> > > independent behaviors at dwc3 core level.
> > >
> > > Signed-off-by: Huang Rui <ray.huang@....com>
> > > ---
> > > drivers/usb/dwc3/core.c | 2 ++
> > > drivers/usb/dwc3/core.h | 3 +++
> > > drivers/usb/dwc3/dwc3-pci.c | 9 +++++++++
> > > drivers/usb/dwc3/platform_data.h | 2 ++
> > > 4 files changed, 16 insertions(+)
> > >
>
> <snip>
>
> > > diff --git a/drivers/usb/dwc3/platform_data.h b/drivers/usb/dwc3/platform_data.h
> > > index 7db34f0..1d3d65f 100644
> > > --- a/drivers/usb/dwc3/platform_data.h
> > > +++ b/drivers/usb/dwc3/platform_data.h
> > > @@ -24,4 +24,6 @@ struct dwc3_platform_data {
> > > enum usb_device_speed maximum_speed;
> > > enum usb_dr_mode dr_mode;
> > > bool tx_fifo_resize;
> > > +
> > > + u32 quirks;
> >
> > I prefer to have one-bit fields like we already have for delayed_status,
> > ep0_bounced, ep0_expect_in, and so on. That makes it easier to support
> > the same quirks through devicetree as well.
> >
>
> So it should define like below:
>
> struct dwc3_platform_data {
> ...
> unsigned one_quirk:1;
> }
>
> Then also defined it in dwc3 structure. And when dwc3 probed, put this
> value from glue layer to dwc3, right?
that's correct.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists