2013-07-31 03:43:45 +08:00
|
|
|
#ifndef _AM335x_PHY_CONTROL_H_
|
|
|
|
#define _AM335x_PHY_CONTROL_H_
|
|
|
|
|
|
|
|
struct phy_control {
|
2015-12-09 00:31:50 +08:00
|
|
|
void (*phy_power)(struct phy_control *phy_ctrl, u32 id,
|
|
|
|
enum usb_dr_mode dr_mode, bool on);
|
2013-07-31 03:43:45 +08:00
|
|
|
void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
|
|
|
|
};
|
|
|
|
|
2015-12-09 00:31:50 +08:00
|
|
|
static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id,
|
|
|
|
enum usb_dr_mode dr_mode, bool on)
|
2013-07-31 03:43:45 +08:00
|
|
|
{
|
2015-12-09 00:31:50 +08:00
|
|
|
phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on);
|
2013-07-31 03:43:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|