aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/musb.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-05-31 10:05:19 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-01 14:58:59 -0700
commit12b7db2bf8b88938798c60416172b53225207b1f (patch)
tree43e7c3b09fec20d63799e5a2740e0e1b26c25f46 /include/linux/usb/musb.h
parentusb: musb: Don't set d+ high before enable for 2430 glue layer (diff)
downloadlinux-dev-12b7db2bf8b88938798c60416172b53225207b1f.tar.xz
linux-dev-12b7db2bf8b88938798c60416172b53225207b1f.zip
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>
Diffstat (limited to 'include/linux/usb/musb.h')
-rw-r--r--include/linux/usb/musb.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 0b3da40a525e..d315c8907869 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -142,10 +142,11 @@ enum musb_vbus_id_status {
};
#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
-void musb_mailbox(enum musb_vbus_id_status status);
+int musb_mailbox(enum musb_vbus_id_status status);
#else
-static inline void musb_mailbox(enum musb_vbus_id_status status)
+static inline int musb_mailbox(enum musb_vbus_id_status status)
{
+ return 0;
}
#endif