diff options
author | Anton Tikhomirov <av.tikhomirov@samsung.com> | 2013-10-03 12:42:04 +0900 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-10-04 09:44:46 -0500 |
commit | 425d710172cee47ed5e18eefd3308d88643de76d (patch) | |
tree | 504560707c915c657e1098addaec43cfb0fade2b /drivers/usb/phy/phy-fsm-usb.h | |
parent | 737cc66eac350d674c72a3f903541644098ec47e (diff) | |
download | op-kernel-dev-425d710172cee47ed5e18eefd3308d88643de76d.zip op-kernel-dev-425d710172cee47ed5e18eefd3308d88643de76d.tar.gz |
usb: phy: Add and use missed helper functions
This patch implements missed helper functions for start_gadget() and
start_host() OTG FSM callbacks.
Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-fsm-usb.h')
-rw-r--r-- | drivers/usb/phy/phy-fsm-usb.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-fsm-usb.h b/drivers/usb/phy/phy-fsm-usb.h index 0f3f7d8..157f106 100644 --- a/drivers/usb/phy/phy-fsm-usb.h +++ b/drivers/usb/phy/phy-fsm-usb.h @@ -160,6 +160,20 @@ static inline int otg_del_timer(struct otg_fsm *fsm, void *timer) return 0; } +static inline int otg_start_host(struct otg_fsm *fsm, int on) +{ + if (!fsm->ops->start_host) + return -EOPNOTSUPP; + return fsm->ops->start_host(fsm, on); +} + +static inline int otg_start_gadget(struct otg_fsm *fsm, int on) +{ + if (!fsm->ops->start_gadget) + return -EOPNOTSUPP; + return fsm->ops->start_gadget(fsm, on); +} + int otg_statemachine(struct otg_fsm *fsm); /* Defined by device specific driver, for different timer implementation */ |