blob: e86b3165d69d363f1384429eac53e9f3d3c59646 [file] [log] [blame]
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +02001#ifndef _AM335x_PHY_CONTROL_H_
2#define _AM335x_PHY_CONTROL_H_
3
4struct phy_control {
Bin Liu59f042f2015-12-08 10:31:50 -06005 void (*phy_power)(struct phy_control *phy_ctrl, u32 id,
6 enum usb_dr_mode dr_mode, bool on);
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +02007 void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
8};
9
Bin Liu59f042f2015-12-08 10:31:50 -060010static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id,
11 enum usb_dr_mode dr_mode, bool on)
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +020012{
Bin Liu59f042f2015-12-08 10:31:50 -060013 phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on);
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +020014}
15
16static inline void phy_ctrl_wkup(struct phy_control *phy_ctrl, u32 id, bool on)
17{
18 phy_ctrl->phy_wkup(phy_ctrl, id, on);
19}
20
21struct phy_control *am335x_get_phy_control(struct device *dev);
22
23#endif