Lines Matching refs:exynos
44 static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos) in dwc3_exynos_register_phys() argument
56 exynos->usb2_phy = pdev; in dwc3_exynos_register_phys()
60 ret = platform_device_add_data(exynos->usb2_phy, &pdata, sizeof(pdata)); in dwc3_exynos_register_phys()
70 exynos->usb3_phy = pdev; in dwc3_exynos_register_phys()
73 ret = platform_device_add_data(exynos->usb3_phy, &pdata, sizeof(pdata)); in dwc3_exynos_register_phys()
77 ret = platform_device_add(exynos->usb2_phy); in dwc3_exynos_register_phys()
81 ret = platform_device_add(exynos->usb3_phy); in dwc3_exynos_register_phys()
88 platform_device_del(exynos->usb2_phy); in dwc3_exynos_register_phys()
91 platform_device_put(exynos->usb3_phy); in dwc3_exynos_register_phys()
94 platform_device_put(exynos->usb2_phy); in dwc3_exynos_register_phys()
110 struct dwc3_exynos *exynos; in dwc3_exynos_probe() local
116 exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL); in dwc3_exynos_probe()
117 if (!exynos) in dwc3_exynos_probe()
129 platform_set_drvdata(pdev, exynos); in dwc3_exynos_probe()
131 ret = dwc3_exynos_register_phys(exynos); in dwc3_exynos_probe()
137 exynos->dev = dev; in dwc3_exynos_probe()
139 exynos->clk = devm_clk_get(dev, "usbdrd30"); in dwc3_exynos_probe()
140 if (IS_ERR(exynos->clk)) { in dwc3_exynos_probe()
144 clk_prepare_enable(exynos->clk); in dwc3_exynos_probe()
146 exynos->susp_clk = devm_clk_get(dev, "usbdrd30_susp_clk"); in dwc3_exynos_probe()
147 if (IS_ERR(exynos->susp_clk)) { in dwc3_exynos_probe()
149 exynos->susp_clk = NULL; in dwc3_exynos_probe()
151 clk_prepare_enable(exynos->susp_clk); in dwc3_exynos_probe()
154 exynos->axius_clk = devm_clk_get(dev, "usbdrd30_axius_clk"); in dwc3_exynos_probe()
155 if (IS_ERR(exynos->axius_clk)) { in dwc3_exynos_probe()
159 clk_prepare_enable(exynos->axius_clk); in dwc3_exynos_probe()
161 exynos->axius_clk = NULL; in dwc3_exynos_probe()
164 exynos->vdd33 = devm_regulator_get(dev, "vdd33"); in dwc3_exynos_probe()
165 if (IS_ERR(exynos->vdd33)) { in dwc3_exynos_probe()
166 ret = PTR_ERR(exynos->vdd33); in dwc3_exynos_probe()
169 ret = regulator_enable(exynos->vdd33); in dwc3_exynos_probe()
175 exynos->vdd10 = devm_regulator_get(dev, "vdd10"); in dwc3_exynos_probe()
176 if (IS_ERR(exynos->vdd10)) { in dwc3_exynos_probe()
177 ret = PTR_ERR(exynos->vdd10); in dwc3_exynos_probe()
180 ret = regulator_enable(exynos->vdd10); in dwc3_exynos_probe()
201 regulator_disable(exynos->vdd10); in dwc3_exynos_probe()
203 regulator_disable(exynos->vdd33); in dwc3_exynos_probe()
205 clk_disable_unprepare(exynos->axius_clk); in dwc3_exynos_probe()
206 clk_disable_unprepare(exynos->susp_clk); in dwc3_exynos_probe()
207 clk_disable_unprepare(exynos->clk); in dwc3_exynos_probe()
213 struct dwc3_exynos *exynos = platform_get_drvdata(pdev); in dwc3_exynos_remove() local
216 platform_device_unregister(exynos->usb2_phy); in dwc3_exynos_remove()
217 platform_device_unregister(exynos->usb3_phy); in dwc3_exynos_remove()
219 clk_disable_unprepare(exynos->axius_clk); in dwc3_exynos_remove()
220 clk_disable_unprepare(exynos->susp_clk); in dwc3_exynos_remove()
221 clk_disable_unprepare(exynos->clk); in dwc3_exynos_remove()
223 regulator_disable(exynos->vdd33); in dwc3_exynos_remove()
224 regulator_disable(exynos->vdd10); in dwc3_exynos_remove()
239 struct dwc3_exynos *exynos = dev_get_drvdata(dev); in dwc3_exynos_suspend() local
241 clk_disable(exynos->axius_clk); in dwc3_exynos_suspend()
242 clk_disable(exynos->clk); in dwc3_exynos_suspend()
244 regulator_disable(exynos->vdd33); in dwc3_exynos_suspend()
245 regulator_disable(exynos->vdd10); in dwc3_exynos_suspend()
252 struct dwc3_exynos *exynos = dev_get_drvdata(dev); in dwc3_exynos_resume() local
255 ret = regulator_enable(exynos->vdd33); in dwc3_exynos_resume()
260 ret = regulator_enable(exynos->vdd10); in dwc3_exynos_resume()
266 clk_enable(exynos->clk); in dwc3_exynos_resume()
267 clk_enable(exynos->axius_clk); in dwc3_exynos_resume()