aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-04-02 07:58:27 -0400
committerFelipe Balbi <balbi@ti.com>2014-04-21 15:07:28 -0400
commit1e42d20c88f2f56c0d81363d7b0f1d3762037f53 (patch)
tree97a44a90d019cdd00d5dac22d3db8a2689965194 /drivers/usb/musb
parent8652bcbfa09ca5ba24423c7c45c28b7d8771e0a8 (diff)
usb: musb: add reset hook to platform ops
Babble interrupts require us to reset the DSPS glue layer. In order to handle all other recovery tasks independently, add a new hook for platform-specific implementations of the actual reset. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 7083e82776ff..5514e4c82932 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -192,6 +192,7 @@ struct musb_platform_ops {
192 192
193 int (*set_mode)(struct musb *musb, u8 mode); 193 int (*set_mode)(struct musb *musb, u8 mode);
194 void (*try_idle)(struct musb *musb, unsigned long timeout); 194 void (*try_idle)(struct musb *musb, unsigned long timeout);
195 void (*reset)(struct musb *musb);
195 196
196 int (*vbus_status)(struct musb *musb); 197 int (*vbus_status)(struct musb *musb);
197 void (*set_vbus)(struct musb *musb, int on); 198 void (*set_vbus)(struct musb *musb, int on);
@@ -552,6 +553,12 @@ static inline void musb_platform_try_idle(struct musb *musb,
552 musb->ops->try_idle(musb, timeout); 553 musb->ops->try_idle(musb, timeout);
553} 554}
554 555
556static inline void musb_platform_reset(struct musb *musb)
557{
558 if (musb->ops->reset)
559 musb->ops->reset(musb);
560}
561
555static inline int musb_platform_get_vbus_status(struct musb *musb) 562static inline int musb_platform_get_vbus_status(struct musb *musb)
556{ 563{
557 if (!musb->ops->vbus_status) 564 if (!musb->ops->vbus_status)