Lines Matching +full:vdd10 +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0
3 * dwc3-exynos.c - Samsung Exynos DWC3 Specific Glue layer
37 struct regulator *vdd10; member
43 struct device *dev = &pdev->dev; in dwc3_exynos_probe()
44 struct device_node *node = dev->of_node; in dwc3_exynos_probe()
50 return -ENOMEM; in dwc3_exynos_probe()
53 exynos->dev = dev; in dwc3_exynos_probe()
54 exynos->num_clks = driver_data->num_clks; in dwc3_exynos_probe()
55 exynos->clk_names = (const char **)driver_data->clk_names; in dwc3_exynos_probe()
56 exynos->suspend_clk_idx = driver_data->suspend_clk_idx; in dwc3_exynos_probe()
60 for (i = 0; i < exynos->num_clks; i++) { in dwc3_exynos_probe()
61 exynos->clks[i] = devm_clk_get(dev, exynos->clk_names[i]); in dwc3_exynos_probe()
62 if (IS_ERR(exynos->clks[i])) { in dwc3_exynos_probe()
64 exynos->clk_names[i]); in dwc3_exynos_probe()
65 return PTR_ERR(exynos->clks[i]); in dwc3_exynos_probe()
69 for (i = 0; i < exynos->num_clks; i++) { in dwc3_exynos_probe()
70 ret = clk_prepare_enable(exynos->clks[i]); in dwc3_exynos_probe()
72 while (i-- > 0) in dwc3_exynos_probe()
73 clk_disable_unprepare(exynos->clks[i]); in dwc3_exynos_probe()
78 if (exynos->suspend_clk_idx >= 0) in dwc3_exynos_probe()
79 clk_prepare_enable(exynos->clks[exynos->suspend_clk_idx]); in dwc3_exynos_probe()
81 exynos->vdd33 = devm_regulator_get(dev, "vdd33"); in dwc3_exynos_probe()
82 if (IS_ERR(exynos->vdd33)) { in dwc3_exynos_probe()
83 ret = PTR_ERR(exynos->vdd33); in dwc3_exynos_probe()
86 ret = regulator_enable(exynos->vdd33); in dwc3_exynos_probe()
88 dev_err(dev, "Failed to enable VDD33 supply\n"); in dwc3_exynos_probe()
92 exynos->vdd10 = devm_regulator_get(dev, "vdd10"); in dwc3_exynos_probe()
93 if (IS_ERR(exynos->vdd10)) { in dwc3_exynos_probe()
94 ret = PTR_ERR(exynos->vdd10); in dwc3_exynos_probe()
97 ret = regulator_enable(exynos->vdd10); in dwc3_exynos_probe()
99 dev_err(dev, "Failed to enable VDD10 supply\n"); in dwc3_exynos_probe()
111 ret = -ENODEV; in dwc3_exynos_probe()
118 regulator_disable(exynos->vdd10); in dwc3_exynos_probe()
120 regulator_disable(exynos->vdd33); in dwc3_exynos_probe()
122 for (i = exynos->num_clks - 1; i >= 0; i--) in dwc3_exynos_probe()
123 clk_disable_unprepare(exynos->clks[i]); in dwc3_exynos_probe()
125 if (exynos->suspend_clk_idx >= 0) in dwc3_exynos_probe()
126 clk_disable_unprepare(exynos->clks[exynos->suspend_clk_idx]); in dwc3_exynos_probe()
136 of_platform_depopulate(&pdev->dev); in dwc3_exynos_remove()
138 for (i = exynos->num_clks - 1; i >= 0; i--) in dwc3_exynos_remove()
139 clk_disable_unprepare(exynos->clks[i]); in dwc3_exynos_remove()
141 if (exynos->suspend_clk_idx >= 0) in dwc3_exynos_remove()
142 clk_disable_unprepare(exynos->clks[exynos->suspend_clk_idx]); in dwc3_exynos_remove()
144 regulator_disable(exynos->vdd33); in dwc3_exynos_remove()
145 regulator_disable(exynos->vdd10); in dwc3_exynos_remove()
151 .suspend_clk_idx = -1,
169 .suspend_clk_idx = -1,
180 .compatible = "samsung,exynos5250-dwusb3",
183 .compatible = "samsung,exynos5433-dwusb3",
186 .compatible = "samsung,exynos7-dwusb3",
189 .compatible = "samsung,exynos850-dwusb3",
192 .compatible = "google,gs101-dwusb3",
204 for (i = exynos->num_clks - 1; i >= 0; i--) in dwc3_exynos_suspend()
205 clk_disable_unprepare(exynos->clks[i]); in dwc3_exynos_suspend()
207 regulator_disable(exynos->vdd33); in dwc3_exynos_suspend()
208 regulator_disable(exynos->vdd10); in dwc3_exynos_suspend()
218 ret = regulator_enable(exynos->vdd33); in dwc3_exynos_resume()
220 dev_err(dev, "Failed to enable VDD33 supply\n"); in dwc3_exynos_resume()
223 ret = regulator_enable(exynos->vdd10); in dwc3_exynos_resume()
225 dev_err(dev, "Failed to enable VDD10 supply\n"); in dwc3_exynos_resume()
229 for (i = 0; i < exynos->num_clks; i++) { in dwc3_exynos_resume()
230 ret = clk_prepare_enable(exynos->clks[i]); in dwc3_exynos_resume()
232 while (i-- > 0) in dwc3_exynos_resume()
233 clk_disable_unprepare(exynos->clks[i]); in dwc3_exynos_resume()
248 .name = "exynos-dwc3",