Lines Matching refs:simple
35 struct dwc3_of_simple *simple; in dwc3_of_simple_probe() local
41 simple = devm_kzalloc(dev, sizeof(*simple), GFP_KERNEL); in dwc3_of_simple_probe()
42 if (!simple) in dwc3_of_simple_probe()
45 platform_set_drvdata(pdev, simple); in dwc3_of_simple_probe()
46 simple->dev = dev; in dwc3_of_simple_probe()
53 simple->need_reset = true; in dwc3_of_simple_probe()
55 simple->resets = of_reset_control_array_get(np, false, true, in dwc3_of_simple_probe()
57 if (IS_ERR(simple->resets)) { in dwc3_of_simple_probe()
58 ret = PTR_ERR(simple->resets); in dwc3_of_simple_probe()
63 ret = reset_control_deassert(simple->resets); in dwc3_of_simple_probe()
67 ret = clk_bulk_get_all(simple->dev, &simple->clks); in dwc3_of_simple_probe()
71 simple->num_clocks = ret; in dwc3_of_simple_probe()
72 ret = clk_bulk_prepare_enable(simple->num_clocks, simple->clks); in dwc3_of_simple_probe()
87 clk_bulk_disable_unprepare(simple->num_clocks, simple->clks); in dwc3_of_simple_probe()
88 clk_bulk_put_all(simple->num_clocks, simple->clks); in dwc3_of_simple_probe()
91 reset_control_assert(simple->resets); in dwc3_of_simple_probe()
94 reset_control_put(simple->resets); in dwc3_of_simple_probe()
98 static void __dwc3_of_simple_teardown(struct dwc3_of_simple *simple) in __dwc3_of_simple_teardown() argument
100 of_platform_depopulate(simple->dev); in __dwc3_of_simple_teardown()
102 clk_bulk_disable_unprepare(simple->num_clocks, simple->clks); in __dwc3_of_simple_teardown()
103 clk_bulk_put_all(simple->num_clocks, simple->clks); in __dwc3_of_simple_teardown()
104 simple->num_clocks = 0; in __dwc3_of_simple_teardown()
106 reset_control_assert(simple->resets); in __dwc3_of_simple_teardown()
108 reset_control_put(simple->resets); in __dwc3_of_simple_teardown()
110 pm_runtime_disable(simple->dev); in __dwc3_of_simple_teardown()
111 pm_runtime_put_noidle(simple->dev); in __dwc3_of_simple_teardown()
112 pm_runtime_set_suspended(simple->dev); in __dwc3_of_simple_teardown()
117 struct dwc3_of_simple *simple = platform_get_drvdata(pdev); in dwc3_of_simple_remove() local
119 __dwc3_of_simple_teardown(simple); in dwc3_of_simple_remove()
124 struct dwc3_of_simple *simple = platform_get_drvdata(pdev); in dwc3_of_simple_shutdown() local
126 __dwc3_of_simple_teardown(simple); in dwc3_of_simple_shutdown()
131 struct dwc3_of_simple *simple = dev_get_drvdata(dev); in dwc3_of_simple_runtime_suspend() local
133 clk_bulk_disable(simple->num_clocks, simple->clks); in dwc3_of_simple_runtime_suspend()
140 struct dwc3_of_simple *simple = dev_get_drvdata(dev); in dwc3_of_simple_runtime_resume() local
142 return clk_bulk_enable(simple->num_clocks, simple->clks); in dwc3_of_simple_runtime_resume()
147 struct dwc3_of_simple *simple = dev_get_drvdata(dev); in dwc3_of_simple_suspend() local
149 if (simple->need_reset) in dwc3_of_simple_suspend()
150 reset_control_assert(simple->resets); in dwc3_of_simple_suspend()
157 struct dwc3_of_simple *simple = dev_get_drvdata(dev); in dwc3_of_simple_resume() local
159 if (simple->need_reset) in dwc3_of_simple_resume()
160 reset_control_deassert(simple->resets); in dwc3_of_simple_resume()