[PATCH v10 6/8] usb: chipidea: imx: add internal vbus regulator control
Felipe Balbi
balbi at ti.com
Wed Feb 27 15:42:49 EST 2013
On Wed, Feb 27, 2013 at 09:08:11PM +0200, Alexander Shishkin wrote:
> On Feb 27, 2013 8:34 AM, "Peter Chen" <peter.chen at freescale.com> 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.
> >
> > Signed-off-by: Peter Chen <peter.chen at freescale.com>
> > ---
> > drivers/usb/chipidea/ci.h | 2 +
> > drivers/usb/chipidea/ci13xxx_imx.c | 76
> ++++++++++++++++++++++++++++--------
> > 2 files changed, 61 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> > index 0bd17a5..5663092 100644
> > --- a/drivers/usb/chipidea/ci.h
> > +++ b/drivers/usb/chipidea/ci.h
> > @@ -133,6 +133,7 @@ struct hw_bank {
> > * @id_event: indicates there is a id event, and handled at ci_otg_work
> > * @b_sess_valid_event: indicates there is a vbus event, and handled
> > * at ci_otg_work
> > + * @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.
I guess it would look better at the phy layer, but looks like we need
another ->set_vbus() method to switch VBUS on/off.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130227/971b7741/attachment.sig>
More information about the linux-arm-kernel
mailing list