diff options
author | Bin Liu <b-liu@ti.com> | 2015-12-08 11:31:50 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-12-16 11:07:25 -0500 |
commit | 59f042f644c5aa10b65b7881966bed78c5c82923 (patch) | |
tree | 6e5be33e51cc8035ce08302e84b74ed0c03cc29f /drivers/usb/phy/phy-am335x-control.h | |
parent | 5306661eff1a70f99456340eddf8e0cf85c2e8af (diff) |
usb: phy: phy-am335x: bypass first VBUS sensing for host-only mode
To prevent VBUS contention, the am335x MUSB phy senses VBUS first before
transitioning to host mode. However, for host-only mode, VBUS could be
directly tied to 5V power rail which could prevent MUSB transitions to
host mode.
This change receives dr_mode of the controller then bypass the first
VBUS sensing for host-only mode, so that MUSB can work in host mode
event if VBUS is tied to 5V.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-am335x-control.h')
-rw-r--r-- | drivers/usb/phy/phy-am335x-control.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/phy/phy-am335x-control.h b/drivers/usb/phy/phy-am335x-control.h index b96594d1962c..e86b3165d69d 100644 --- a/drivers/usb/phy/phy-am335x-control.h +++ b/drivers/usb/phy/phy-am335x-control.h | |||
@@ -2,13 +2,15 @@ | |||
2 | #define _AM335x_PHY_CONTROL_H_ | 2 | #define _AM335x_PHY_CONTROL_H_ |
3 | 3 | ||
4 | struct phy_control { | 4 | struct phy_control { |
5 | void (*phy_power)(struct phy_control *phy_ctrl, u32 id, bool on); | 5 | void (*phy_power)(struct phy_control *phy_ctrl, u32 id, |
6 | enum usb_dr_mode dr_mode, bool on); | ||
6 | void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on); | 7 | void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on); |
7 | }; | 8 | }; |
8 | 9 | ||
9 | static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id, bool on) | 10 | static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id, |
11 | enum usb_dr_mode dr_mode, bool on) | ||
10 | { | 12 | { |
11 | phy_ctrl->phy_power(phy_ctrl, id, on); | 13 | phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on); |
12 | } | 14 | } |
13 | 15 | ||
14 | static inline void phy_ctrl_wkup(struct phy_control *phy_ctrl, u32 id, bool on) | 16 | static inline void phy_ctrl_wkup(struct phy_control *phy_ctrl, u32 id, bool on) |