[PATCH v2 04/22] usb: chipidea: Only read/write OTGSC from one place

Stephen Boyd stephen.boyd at linaro.org
Fri Aug 5 14:41:37 PDT 2016


Quoting Peter Chen (2016-07-08 02:14:57)
> On Thu, Jul 07, 2016 at 03:20:55PM -0700, Stephen Boyd wrote:
> > diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
> > index 03b6743461d1..a6fc60934297 100644
> > --- a/drivers/usb/chipidea/otg.c
> > +++ b/drivers/usb/chipidea/otg.c
> > @@ -104,7 +104,31 @@ void ci_handle_vbus_change(struct ci_hdrc *ci)
> >               usb_gadget_vbus_disconnect(&ci->gadget);
> >  }
> >  
> > -#define CI_VBUS_STABLE_TIMEOUT_MS 5000
> > +/**
> > + * When we switch to device mode, the vbus value should be lower
> > + * than OTGSC_BSV before connecting to host.
> > + *
> > + * @ci: the controller
> > + *
> > + * This function returns an error code if timeout
> > + */
> > +static int hw_wait_otgsc_bsv(struct ci_hdrc *ci)
> 
> I think the function name should reflect "we wait for vbus lower than bsv"
> Care to change one?
> 

Sure, something like hw_wait_vbus_lower_bsv()?



More information about the linux-arm-kernel mailing list