Re: [PATCH v11 6/9] usb: chipidea: add vbus regulator control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 07, 2013 at 11:52:48AM +0200, Felipe Balbi wrote:
> On Thu, Mar 07, 2013 at 10:41:03AM +0800, Peter Chen wrote:
> > On Wed, Mar 06, 2013 at 01:29:16PM +0200, Felipe Balbi wrote:
> > > Hi,
> > > 
> > > On Wed, Mar 06, 2013 at 05:56:37PM +0800, Peter Chen wrote:
> > > > For boards which have board level vbus control (eg, gpio), we
> > > > need to operation vbus according to below rules:
> > > > - For host, the vbus should always be on.
> > > > - For otg, the vbus needs to be turned on/off when usb role switches.
> > > > 
> > > > We put vbus operation to host as host is the only vbus user,
> > > > When we are at host mode, the vbus is on, when we are not at
> > > > host mode, vbus should be off.
> > > > 
> > > > Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx>
> > > > ---
> > > >  
> > > > @@ -603,6 +594,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> > > >  
> > > >  	ci->dev = dev;
> > > >  	ci->platdata = dev->platform_data;
> > > > +	ci->reg_vbus = ci->platdata->reg_vbus;
> > > 
> > > nak, teach ci_hdrc_probe() how to get its own regulator.
> > > 
> > > >  	if (ci->platdata->phy)
> > > >  		ci->transceiver = ci->platdata->phy;
> > > 
> > > this should happen for PHYs as well btw.
> > 
> > Like I said at previous email, core code has NO DTS entry.
> 
> that's your problem :-)
> 
> You can just as well create both nodes in DTS file:
> 
> ci13xx_fsl@foo {
> 	compatible = "fsl,chipidea";
> 	reg = <foo size>;
> 	blablabla
> 	ranges;
> 
> 	chipidea_core@bar {
> 		compatible = "chipidea";
> 		reg <bar size>;
> 		blablabla
> 	};
> };
> 
> then assign the regulator to chipidea itself, not to the glue.

No, that will make things more complicated at current chipidea driver.

Differ with dwc3, chipidea created its platform data at glue layer,
and chipidea core owing this data when platform device is created.

If we also want get things from DT node, we need to get node from
glue layer as this node is NOT belonged to chipidea core's pdev.
(We can't get it through compatible string as compatible string
 is the same from every chipidea device)

Convert platform data to DT for chipidea core is a big job,
it is out of scope of this patch. If Alex also thinks we
are deserved to do it, I can do it later.

> 
> -- 
> balbi



-- 

Best Regards,
Peter Chen

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux