summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_core.h
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2015-02-26 14:20:58 -0600
committerFelipe Balbi <balbi@ti.com>2015-03-10 15:33:29 -0500
commitb28a6432405ca95b3da25630d79d2463c754a79c (patch)
tree9e547cd0d67ce873311ad0b264092d2850f05216 /drivers/usb/musb/musb_core.h
parentb4dc38fd45b63e3da2bc98db5d283a15a637a2fa (diff)
usb: musb: rename ->reset() to ->recover()
recover is a much better name than reset, considering we don't really reset the IP, just run platform-specific babble recovery algorithm. while at that, also fix a typo in comment and add kdoc for recover memeber of platform_ops. Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r--drivers/usb/musb/musb_core.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 5e65958f7915..1e03c7ec82e4 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -160,7 +160,8 @@ struct musb_io;
* @init: turns on clocks, sets up platform-specific registers, etc
* @exit: undoes @init
* @set_mode: forcefully changes operating mode
- * @try_ilde: tries to idle the IP
+ * @try_idle: tries to idle the IP
+ * @recover: platform-specific babble recovery
* @vbus_status: returns vbus status if possible
* @set_vbus: forces vbus status
* @adjust_channel_params: pre check for standard dma channel_program func
@@ -196,7 +197,7 @@ struct musb_platform_ops {
void (*write_fifo)(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf);
int (*set_mode)(struct musb *musb, u8 mode);
void (*try_idle)(struct musb *musb, unsigned long timeout);
- int (*reset)(struct musb *musb);
+ int (*recover)(struct musb *musb);
int (*vbus_status)(struct musb *musb);
void (*set_vbus)(struct musb *musb, int on);
@@ -558,12 +559,12 @@ static inline void musb_platform_try_idle(struct musb *musb,
musb->ops->try_idle(musb, timeout);
}
-static inline int musb_platform_reset(struct musb *musb)
+static inline int musb_platform_recover(struct musb *musb)
{
- if (!musb->ops->reset)
- return -EINVAL;
+ if (!musb->ops->recover)
+ return 0;
- return musb->ops->reset(musb);
+ return musb->ops->recover(musb);
}
static inline int musb_platform_get_vbus_status(struct musb *musb)