blob: cd4acfc6e360644730ae66bb723d722099269462 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +02002#ifndef _AM335x_PHY_CONTROL_H_
3#define _AM335x_PHY_CONTROL_H_
4
5struct phy_control {
Bin Liu59f042f2015-12-08 10:31:50 -06006 void (*phy_power)(struct phy_control *phy_ctrl, u32 id,
7 enum usb_dr_mode dr_mode, bool on);
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +02008 void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
9};
10
Bin Liu59f042f2015-12-08 10:31:50 -060011static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id,
12 enum usb_dr_mode dr_mode, bool on)
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +020013{
Bin Liu59f042f2015-12-08 10:31:50 -060014 phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on);
Sebastian Andrzej Siewior3bb869c2013-07-30 21:43:45 +020015}
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