]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: Return error value from musb_mailbox
authorTony Lindgren <tony@atomide.com>
Tue, 31 May 2016 15:05:19 +0000 (10:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Jun 2016 21:58:59 +0000 (14:58 -0700)
commit3a79d0f6341e12068db26d260ce4e1213c28c59b
tree43e7c3b09fec20d63799e5a2740e0e1b26c25f46
parentfc1aacf9b7f108730bf48e30b671a42481603e15
usb: musb: Return error value from musb_mailbox

At least on n900 we have phy-twl4030-usb only generating cable
interrupts, and then have a separate USB PHY.

In order for musb to know the real cable status, we need to
clear any cached state until musb is ready. Otherwise the cable
status interrupts will get just ignored if the status does
not change from the initial state.

To do this, let's add a return value to musb_mailbox(), and
reset cached linkstat to MUSB_UNKNOWN on error. Sorry to cause
a bit of churn here, I should have added that already last time
patching musb_mailbox().

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/phy-twl4030-usb.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/omap2430.c
drivers/usb/phy/phy-twl6030-usb.c
include/linux/usb/musb.h