mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08:00
59f042f644
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>
24 lines
611 B
C
24 lines
611 B
C
#ifndef _AM335x_PHY_CONTROL_H_
|
|
#define _AM335x_PHY_CONTROL_H_
|
|
|
|
struct phy_control {
|
|
void (*phy_power)(struct phy_control *phy_ctrl, u32 id,
|
|
enum usb_dr_mode dr_mode, bool on);
|
|
void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
|
|
};
|
|
|
|
static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id,
|
|
enum usb_dr_mode dr_mode, bool on)
|
|
{
|
|
phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on);
|
|
}
|
|
|
|
static inline void phy_ctrl_wkup(struct phy_control *phy_ctrl, u32 id, bool on)
|
|
{
|
|
phy_ctrl->phy_wkup(phy_ctrl, id, on);
|
|
}
|
|
|
|
struct phy_control *am335x_get_phy_control(struct device *dev);
|
|
|
|
#endif
|