Lines Matching full:pm

19 	struct s5p_mfc_pm *pm = &dev->pm;  in s5p_mfc_init_pm()  local
22 pm->num_clocks = dev->variant->num_clocks; in s5p_mfc_init_pm()
23 pm->clk_names = dev->variant->clk_names; in s5p_mfc_init_pm()
24 pm->device = &dev->plat_dev->dev; in s5p_mfc_init_pm()
25 pm->clock_gate = NULL; in s5p_mfc_init_pm()
28 for (i = 0; i < pm->num_clocks; i++) { in s5p_mfc_init_pm()
29 pm->clocks[i] = devm_clk_get(pm->device, pm->clk_names[i]); in s5p_mfc_init_pm()
30 if (IS_ERR(pm->clocks[i])) { in s5p_mfc_init_pm()
32 if (i && PTR_ERR(pm->clocks[i]) == -ENOENT) { in s5p_mfc_init_pm()
33 pm->clocks[i] = NULL; in s5p_mfc_init_pm()
37 pm->clk_names[i]); in s5p_mfc_init_pm()
38 return PTR_ERR(pm->clocks[i]); in s5p_mfc_init_pm()
43 pm->clock_gate = pm->clocks[0]; in s5p_mfc_init_pm()
45 pm_runtime_enable(pm->device); in s5p_mfc_init_pm()
51 pm_runtime_disable(dev->pm.device); in s5p_mfc_final_pm()
56 return clk_enable(dev->pm.clock_gate); in s5p_mfc_clock_on()
61 clk_disable(dev->pm.clock_gate); in s5p_mfc_clock_off()
68 ret = pm_runtime_resume_and_get(dev->pm.device); in s5p_mfc_power_on()
73 for (i = 0; i < dev->pm.num_clocks; i++) { in s5p_mfc_power_on()
74 ret = clk_prepare_enable(dev->pm.clocks[i]); in s5p_mfc_power_on()
77 dev->pm.clk_names[i]); in s5p_mfc_power_on()
83 clk_disable(dev->pm.clock_gate); in s5p_mfc_power_on()
88 clk_disable_unprepare(dev->pm.clocks[i]); in s5p_mfc_power_on()
89 pm_runtime_put(dev->pm.device); in s5p_mfc_power_on()
98 clk_enable(dev->pm.clock_gate); in s5p_mfc_power_off()
100 for (i = 0; i < dev->pm.num_clocks; i++) in s5p_mfc_power_off()
101 clk_disable_unprepare(dev->pm.clocks[i]); in s5p_mfc_power_off()
103 return pm_runtime_put_sync(dev->pm.device); in s5p_mfc_power_off()