alistair23-linux/drivers/usb/phy/am35x-phy-control.h
Sebastian Andrzej Siewior 3bb869c8b3 usb: phy: Add AM335x PHY driver
This driver is a redo of my earlier attempt. It uses parts of the
generic PHY driver and uses the new control driver for the register
the phy needs to power on/off the phy. It also enables easy access for
the wakeup register which is not yet implemented.
The difference between the omap attempt is:
- no static holding variable
- one global visible function which exports a struct with callbacks to
  access the "control" registers.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-08-09 17:34:15 +03:00

22 lines
543 B
C

#ifndef _AM335x_PHY_CONTROL_H_
#define _AM335x_PHY_CONTROL_H_
struct phy_control {
void (*phy_power)(struct phy_control *phy_ctrl, u32 id, 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, bool on)
{
phy_ctrl->phy_power(phy_ctrl, id, 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