Message ID | 4D963D4F.2050203@tomtom.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Apr 01, 2011 at 11:02:07PM +0200, Matthias Kaehlcke wrote: > The twl4030-usb driver exports the status of VBUS as sysfs attribute. > In case an accessory charger adapter (ACA) is connected to the OTG > transceiver the attribute is always 'off', even when the charger > provides VBUS. Added a variable to keep track of the status of VBUS > and report it correctly > > Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@tomtom.com> Ick, your email software turned the patch into a mess. I've edited it by hand, fixing it up, but next time, please fix your email client so this doesn't happen again. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index e01b073..efeb4d1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -160,6 +160,7 @@ struct twl4030_usb { int irq; u8 linkstat; + bool vbus_supplied; u8 asleep; bool irq_enabled; }; @@ -250,6 +251,8 @@ static enum usb_xceiv_events twl4030_usb_linkstat(struct twl4030_usb *twl) int status; int linkstat = USB_EVENT_NONE; + twl->vbus_supplied = false; + /* * For ID/VBUS sensing, see manual section 15.4.8 ...