#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/phy/phy.h>
struct reset_control *reset;
struct reset_control *no_suspend_override;
static int ath79_usb_phy_power_on(struct phy *phy)
struct ath79_usb_phy *priv = phy_get_drvdata(phy);
if (priv->no_suspend_override) {
err = reset_control_assert(priv->no_suspend_override);
err = reset_control_deassert(priv->reset);
if (err && priv->no_suspend_override)
reset_control_deassert(priv->no_suspend_override);
static int ath79_usb_phy_power_off(struct phy *phy)
struct ath79_usb_phy *priv = phy_get_drvdata(phy);
err = reset_control_assert(priv->reset);
if (priv->no_suspend_override) {
err = reset_control_deassert(priv->no_suspend_override);
reset_control_deassert(priv->reset);
static const struct phy_ops ath79_usb_phy_ops = {
.power_on = ath79_usb_phy_power_on,
.power_off = ath79_usb_phy_power_off,
static int ath79_usb_phy_probe(struct platform_device *pdev)