Lines Matching +full:analog +full:- +full:out
1 // SPDX-License-Identifier: GPL-2.0
13 #include <dt-bindings/phy/phy.h>
29 struct phy *analog; member
46 ret = phy_power_on(priv->analog); in phy_axg_pcie_power_on()
50 regmap_update_bits(priv->regmap, MESON_PCIE_REG0, in phy_axg_pcie_power_on()
60 ret = phy_power_off(priv->analog); in phy_axg_pcie_power_off()
64 regmap_update_bits(priv->regmap, MESON_PCIE_REG0, in phy_axg_pcie_power_off()
74 ret = phy_init(priv->analog); in phy_axg_pcie_init()
78 regmap_write(priv->regmap, MESON_PCIE_REG0, MESON_PCIE_PHY_INIT); in phy_axg_pcie_init()
79 return reset_control_reset(priv->reset); in phy_axg_pcie_init()
87 ret = phy_exit(priv->analog); in phy_axg_pcie_exit()
91 return reset_control_reset(priv->reset); in phy_axg_pcie_exit()
99 ret = phy_reset(priv->analog); in phy_axg_pcie_reset()
101 goto out; in phy_axg_pcie_reset()
103 ret = reset_control_assert(priv->reset); in phy_axg_pcie_reset()
105 goto out; in phy_axg_pcie_reset()
108 ret = reset_control_deassert(priv->reset); in phy_axg_pcie_reset()
110 goto out; in phy_axg_pcie_reset()
113 out: in phy_axg_pcie_reset()
129 struct device *dev = &pdev->dev; in phy_axg_pcie_probe()
131 struct device_node *np = dev->of_node; in phy_axg_pcie_probe()
138 return -ENOMEM; in phy_axg_pcie_probe()
140 priv->phy = devm_phy_create(dev, np, &phy_axg_pcie_ops); in phy_axg_pcie_probe()
141 if (IS_ERR(priv->phy)) { in phy_axg_pcie_probe()
142 ret = PTR_ERR(priv->phy); in phy_axg_pcie_probe()
143 if (ret != -EPROBE_DEFER) in phy_axg_pcie_probe()
153 priv->regmap = devm_regmap_init_mmio(dev, base, in phy_axg_pcie_probe()
155 if (IS_ERR(priv->regmap)) in phy_axg_pcie_probe()
156 return PTR_ERR(priv->regmap); in phy_axg_pcie_probe()
158 priv->reset = devm_reset_control_array_get(dev, false, false); in phy_axg_pcie_probe()
159 if (IS_ERR(priv->reset)) in phy_axg_pcie_probe()
160 return PTR_ERR(priv->reset); in phy_axg_pcie_probe()
162 priv->analog = devm_phy_get(dev, "analog"); in phy_axg_pcie_probe()
163 if (IS_ERR(priv->analog)) in phy_axg_pcie_probe()
164 return PTR_ERR(priv->analog); in phy_axg_pcie_probe()
166 phy_set_drvdata(priv->phy, priv); in phy_axg_pcie_probe()
175 .compatible = "amlogic,axg-pcie-phy",
184 .name = "phy-axg-pcie",