Re: [PATCH 4/4] USB: gpio_vbus: avoid consecutive vbus_session calls with the same "is_active"

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

 



On Thu, May 10, 2012 at 12:45:48PM +0900, Shinya Kuribayashi wrote:
> On 5/10/2012 10:32 AM, Shinya Kuribayashi wrote:
> > Basically, ->vbus_session() calls should be served when VBUS session
> > starts and ends (it's not whenever transciever drivers detect VBUS
> > _changes_).  Otherwise, if UDC gadget drivers don't want for some
> > reason ->vbus_session() calls with the same "is_active" value, either
> > OTG or UDC drivers need to have some protection handlings.
> > 
> > Also, on platforms using this 'gpio_vbus' driver, the driver is only
> > allowed to check whether VBUS is applied.  There is no kernel-standard
> > way prepared for UDC gadget drivers to do that.
> > 
> > With this in mind, gpio_vbus should try to prevent unnecessary
> > consecutive vbus_session calls being served with the same "in_active"
> > value.
> > 
> > Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@xxxxxxxxxxx>
> > ---
> >  drivers/usb/otg/gpio_vbus.c |   12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c
> > index ac962ac..a190ead 100644
> > --- a/drivers/usb/otg/gpio_vbus.c
> > +++ b/drivers/usb/otg/gpio_vbus.c
> > @@ -38,6 +38,7 @@ struct gpio_vbus_data {
> >  	int			vbus_draw_enabled;
> >  	unsigned		mA;
> >  	struct delayed_work	work;
> > +	unsigned int		vbus;
> >  };
> >  
> >  
> 
> Oops, this has to be just "int", not "unsigned int".  It would be
> fine somebody in charge would correct it on your side, if this is
> to be picked up.  Thanks in advance.

No, please fix it up properly and resend if you wish to see this
accepted.

You want to do everything you can to get us to accept your patches, not
make us do work for it, right?

thanks,

greg k-h
--
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