1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef _AM335x_PHY_CONTROL_H_
3*4882a593Smuzhiyun #define _AM335x_PHY_CONTROL_H_
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun struct phy_control {
6*4882a593Smuzhiyun void (*phy_power)(struct phy_control *phy_ctrl, u32 id,
7*4882a593Smuzhiyun enum usb_dr_mode dr_mode, bool on);
8*4882a593Smuzhiyun void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
9*4882a593Smuzhiyun };
10*4882a593Smuzhiyun
phy_ctrl_power(struct phy_control * phy_ctrl,u32 id,enum usb_dr_mode dr_mode,bool on)11*4882a593Smuzhiyun static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id,
12*4882a593Smuzhiyun enum usb_dr_mode dr_mode, bool on)
13*4882a593Smuzhiyun {
14*4882a593Smuzhiyun phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on);
15*4882a593Smuzhiyun }
16*4882a593Smuzhiyun
phy_ctrl_wkup(struct phy_control * phy_ctrl,u32 id,bool on)17*4882a593Smuzhiyun static inline void phy_ctrl_wkup(struct phy_control *phy_ctrl, u32 id, bool on)
18*4882a593Smuzhiyun {
19*4882a593Smuzhiyun phy_ctrl->phy_wkup(phy_ctrl, id, on);
20*4882a593Smuzhiyun }
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun struct phy_control *am335x_get_phy_control(struct device *dev);
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun #endif
25