swh:1:snp:49cd9498d6cccc5e78252c27dcb645bcf7bf0c91
Raw File
Tip revision: 50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 authored by Linus Torvalds on 11 December 2017, 01:56:26 UTC
Linux 4.15-rc3
Tip revision: 50c4c4e
phy-am335x-control.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _AM335x_PHY_CONTROL_H_
#define _AM335x_PHY_CONTROL_H_

struct phy_control {
	void (*phy_power)(struct phy_control *phy_ctrl, u32 id,
			enum usb_dr_mode dr_mode, bool on);
	void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
};

static inline void phy_ctrl_power(struct phy_control *phy_ctrl, u32 id,
				enum usb_dr_mode dr_mode, bool on)
{
	phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on);
}

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
back to top