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