[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM4PR04MB213028144706EC69A066EAEE89400@AM4PR04MB2130.eurprd04.prod.outlook.com>
Date: Wed, 25 May 2016 14:44:32 +0000
From: Jun Li <jun.li@....com>
To: Roger Quadros <rogerq@...com>, Peter Chen <hzpeterchen@...il.com>
CC: "peter.chen@...escale.com" <peter.chen@...escale.com>,
"balbi@...nel.org" <balbi@...nel.org>,
"tony@...mide.com" <tony@...mide.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"mathias.nyman@...ux.intel.com" <mathias.nyman@...ux.intel.com>,
"Joao.Pinto@...opsys.com" <Joao.Pinto@...opsys.com>,
"sergei.shtylyov@...entembedded.com"
<sergei.shtylyov@...entembedded.com>,
"jun.li@...escale.com" <jun.li@...escale.com>,
"grygorii.strashko@...com" <grygorii.strashko@...com>,
"yoshihiro.shimoda.uh@...esas.com" <yoshihiro.shimoda.uh@...esas.com>,
"robh@...nel.org" <robh@...nel.org>,
"nsekhar@...com" <nsekhar@...com>, "b-liu@...com" <b-liu@...com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: [PATCH v8 08/14] usb: otg: add OTG/dual-role core
Hi Roger
> >>
> >> Here, we should be checking if user needs to disable any OTG
> >> features. So,
> >>
> >> if (dev->of_node)
> >> of_usb_update_otg_caps(dev->of_node, &otg->caps);
> >>
> >> Do you agree?
> >> This means we need to change otg->caps from 'struct usb_otg_caps
> *caps;'
> >> to 'struct usb_otg_caps caps;' so that we can modify the local copy
> >> instead of the one passed by the OTG controller.
> >
> > Why can't modify the one from OTG controller directly?
> >
>
> There are 2 things.
> 1) OTG features supported by hardware. This is the controller's config-
> >otg_caps
> 2) OTG features needed by system designer. This can be a subset of (1).
Let's make things simple, we only need this subnet, which can be set
by controller driver in config->otg_caps before pass (its address)
to OTG core.
So controller driver should get the capability of HW(+SW) and user config
by whatever approach, then set its config->otg_caps.
Li Jun
Powered by blists - more mailing lists