Skip to content

Commit

Permalink
usb: musb: add reset hook to platform ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Mack authored and Felipe Balbi committed Apr 21, 2014
1 parent 8652bcb commit 1e42d20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/usb/musb/musb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ struct musb_platform_ops {

int (*set_mode)(struct musb *musb, u8 mode);
void (*try_idle)(struct musb *musb, unsigned long timeout);
void (*reset)(struct musb *musb);

int (*vbus_status)(struct musb *musb);
void (*set_vbus)(struct musb *musb, int on);
Expand Down Expand Up @@ -552,6 +553,12 @@ static inline void musb_platform_try_idle(struct musb *musb,
musb->ops->try_idle(musb, timeout);
}

static inline void musb_platform_reset(struct musb *musb)
{
if (musb->ops->reset)
musb->ops->reset(musb);
}

static inline int musb_platform_get_vbus_status(struct musb *musb)
{
if (!musb->ops->vbus_status)
Expand Down

0 comments on commit 1e42d20

Please sign in to comment.