Lines Matching +full:no +full:- +full:reset +full:- +full:on +full:- +full:init
1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/reset.h>
44 reset_control_deassert(phy_dev->rstc); in stih407_usb2_pico_ctrl()
46 return regmap_update_bits(phy_dev->regmap, phy_dev->ctrl, in stih407_usb2_pico_ctrl()
58 ret = regmap_update_bits(phy_dev->regmap, in stih407_usb2_init_port()
59 phy_dev->param, in stih407_usb2_init_port()
65 return reset_control_deassert(phy_dev->rstport); in stih407_usb2_init_port()
73 * Only port reset is asserted, phy global reset is kept untouched in stih407_usb2_exit_port()
74 * as other ports may still be active. When all ports are in reset in stih407_usb2_exit_port()
75 * state, assumption is made that power will be cut off on the phy, in in stih407_usb2_exit_port()
77 * reset (like here) or global reset should be equivalent. in stih407_usb2_exit_port()
79 return reset_control_assert(phy_dev->rstport); in stih407_usb2_exit_port()
83 .init = stih407_usb2_init_port,
91 struct device *dev = &pdev->dev; in stih407_usb2_picophy_probe()
92 struct device_node *np = dev->of_node; in stih407_usb2_picophy_probe()
99 return -ENOMEM; in stih407_usb2_picophy_probe()
101 phy_dev->dev = dev; in stih407_usb2_picophy_probe()
104 phy_dev->rstc = devm_reset_control_get_shared(dev, "global"); in stih407_usb2_picophy_probe()
105 if (IS_ERR(phy_dev->rstc)) { in stih407_usb2_picophy_probe()
106 dev_err(dev, "failed to ctrl picoPHY reset\n"); in stih407_usb2_picophy_probe()
107 return PTR_ERR(phy_dev->rstc); in stih407_usb2_picophy_probe()
110 phy_dev->rstport = devm_reset_control_get_exclusive(dev, "port"); in stih407_usb2_picophy_probe()
111 if (IS_ERR(phy_dev->rstport)) { in stih407_usb2_picophy_probe()
112 dev_err(dev, "failed to ctrl picoPHY reset\n"); in stih407_usb2_picophy_probe()
113 return PTR_ERR(phy_dev->rstport); in stih407_usb2_picophy_probe()
116 /* Reset port by default: only deassert it in phy init */ in stih407_usb2_picophy_probe()
117 reset_control_assert(phy_dev->rstport); in stih407_usb2_picophy_probe()
119 phy_dev->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); in stih407_usb2_picophy_probe()
120 if (IS_ERR(phy_dev->regmap)) { in stih407_usb2_picophy_probe()
121 dev_err(dev, "No syscfg phandle specified\n"); in stih407_usb2_picophy_probe()
122 return PTR_ERR(phy_dev->regmap); in stih407_usb2_picophy_probe()
126 &phy_dev->param); in stih407_usb2_picophy_probe()
133 &phy_dev->ctrl); in stih407_usb2_picophy_probe()
145 phy_dev->phy = phy; in stih407_usb2_picophy_probe()
158 { .compatible = "st,stih407-usb2-phy" },
167 .name = "stih407-usb-genphy",