Lines Matching full:power
25 static void dp_power_regulator_disable(struct dp_power_private *power) in dp_power_regulator_disable() argument
27 struct regulator_bulk_data *s = power->supplies; in dp_power_regulator_disable()
28 const struct dp_reg_entry *regs = power->parser->regulator_cfg->regs; in dp_power_regulator_disable()
29 int num = power->parser->regulator_cfg->num; in dp_power_regulator_disable()
41 static int dp_power_regulator_enable(struct dp_power_private *power) in dp_power_regulator_enable() argument
43 struct regulator_bulk_data *s = power->supplies; in dp_power_regulator_enable()
44 const struct dp_reg_entry *regs = power->parser->regulator_cfg->regs; in dp_power_regulator_enable()
45 int num = power->parser->regulator_cfg->num; in dp_power_regulator_enable()
75 static int dp_power_regulator_init(struct dp_power_private *power) in dp_power_regulator_init() argument
77 struct regulator_bulk_data *s = power->supplies; in dp_power_regulator_init()
78 const struct dp_reg_entry *regs = power->parser->regulator_cfg->regs; in dp_power_regulator_init()
79 struct platform_device *pdev = power->pdev; in dp_power_regulator_init()
80 int num = power->parser->regulator_cfg->num; in dp_power_regulator_init()
96 static int dp_power_clk_init(struct dp_power_private *power) in dp_power_clk_init() argument
100 struct device *dev = &power->pdev->dev; in dp_power_clk_init()
102 core = &power->parser->mp[DP_CORE_PM]; in dp_power_clk_init()
103 ctrl = &power->parser->mp[DP_CTRL_PM]; in dp_power_clk_init()
104 stream = &power->parser->mp[DP_STREAM_PM]; in dp_power_clk_init()
132 static int dp_power_clk_deinit(struct dp_power_private *power) in dp_power_clk_deinit() argument
136 core = &power->parser->mp[DP_CORE_PM]; in dp_power_clk_deinit()
137 ctrl = &power->parser->mp[DP_CTRL_PM]; in dp_power_clk_deinit()
138 stream = &power->parser->mp[DP_STREAM_PM]; in dp_power_clk_deinit()
151 static int dp_power_clk_set_rate(struct dp_power_private *power, in dp_power_clk_set_rate() argument
155 struct dss_module_power *mp = &power->parser->mp[module]; in dp_power_clk_set_rate()
192 struct dp_power_private *power; in dp_power_clk_enable() local
194 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_clk_enable()
198 DRM_ERROR("unsupported power module: %s\n", in dp_power_clk_enable()
222 rc = dp_power_clk_set_rate(power, DP_CORE_PM, enable); in dp_power_clk_enable()
232 rc = dp_power_clk_set_rate(power, pm_type, enable); in dp_power_clk_enable()
261 struct dp_power_private *power; in dp_power_client_init() local
264 DRM_ERROR("invalid power data\n"); in dp_power_client_init()
268 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_client_init()
270 pm_runtime_enable(&power->pdev->dev); in dp_power_client_init()
272 rc = dp_power_regulator_init(power); in dp_power_client_init()
278 rc = dp_power_clk_init(power); in dp_power_client_init()
286 pm_runtime_disable(&power->pdev->dev); in dp_power_client_init()
292 struct dp_power_private *power; in dp_power_client_deinit() local
295 DRM_ERROR("invalid power data\n"); in dp_power_client_deinit()
299 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_client_deinit()
301 dp_power_clk_deinit(power); in dp_power_client_deinit()
302 pm_runtime_disable(&power->pdev->dev); in dp_power_client_deinit()
309 struct dp_power_private *power = NULL; in dp_power_init() local
312 DRM_ERROR("invalid power data\n"); in dp_power_init()
316 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_init()
318 pm_runtime_get_sync(&power->pdev->dev); in dp_power_init()
319 rc = dp_power_regulator_enable(power); in dp_power_init()
334 dp_power_regulator_disable(power); in dp_power_init()
336 pm_runtime_put_sync(&power->pdev->dev); in dp_power_init()
342 struct dp_power_private *power; in dp_power_deinit() local
344 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_deinit()
347 dp_power_regulator_disable(power); in dp_power_deinit()
348 pm_runtime_put_sync(&power->pdev->dev); in dp_power_deinit()
354 struct dp_power_private *power; in dp_power_get() local
362 power = devm_kzalloc(&parser->pdev->dev, sizeof(*power), GFP_KERNEL); in dp_power_get()
363 if (!power) in dp_power_get()
366 power->parser = parser; in dp_power_get()
367 power->pdev = parser->pdev; in dp_power_get()
369 dp_power = &power->dp_power; in dp_power_get()