Re: [PATCH v10 6/8] usb: chipidea: imx: add internal vbus regulator control

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

 



On Thu, Feb 28, 2013 at 09:29:46AM +0200, Felipe Balbi wrote:
> On Thu, Feb 28, 2013 at 02:06:09PM +0800, Peter Chen wrote:
> > On Wed, Feb 27, 2013 at 09:08:11PM +0200, Alexander Shishkin wrote:
> > >    On Feb 27, 2013 8:34 AM, "Peter Chen" <peter.chen@xxxxxxxxxxxxx> wrote:
> > >    >
> > >    > - For host, the vbus should always be on.
> > >    > - For otg, the vbus is off defaultly, the vbus needs to be
> > >    > turned on/off when usb role switches.
> > >    >
> > >    > + * @reg_vbus: used to control internal vbus regulator
> > >    >   */
> > >    >  struct ci13xxx {
> > >    >         struct device                   *dev;
> > >    > @@ -172,6 +173,7 @@ struct ci13xxx {
> > >    >         struct usb_otg                  otg;
> > >    >         bool                            id_event;
> > >    >         bool                            b_sess_valid_event;
> > >    > +       struct regulator                *reg_vbus;
> > >    >  };
> > > 
> > >    I suggest that this regulator be taken care of by either the platform code
> > >    or phy layer, it doesn't look like it really belongs in chipidea core. The
> > >    easiest way I guess would be to do something similar to the notify
> > >    callback in msm platform code.
> > 
> > VBUS operation is typical operation during the USB code, eg, we need
> > to open vbus at Host mode, we need close/open vbus during host<->gadget
> > switch.
> > 
> > I suggest vbus regulator is specified at platform code, and assign it
> > to ci core's pdata, like sasche's patch pdata->dr_mode and pdata->phy_mode.
> 
> you don't need platform_data for it. From ci core probe try to get the
> regulator, if it doesn't exist, ignore the error and continue anyways.

The pdev of ci core is created by platform layer, at ci core probe, it
can't get platform things unless it is passed from platform layer

> 
> -- 
> 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