1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
12 * sruct dp_power - DisplayPort's power related data
14 * @init: initializes the regulators/core clocks/GPIOs/pinctrl
15 * @deinit: turns off the regulators/core clocks/GPIOs/pinctrl
16 * @clk_enable: enable/disable the DP clocks
17 * @set_pixel_clk_parent: set the parent of DP pixel clock
26 * dp_power_init() - enable power supplies for display controller
28 * @power: instance of power module
29 * return: 0 if success or error if failure.
31 * This API will turn on the regulators and configures gpio's
34 int dp_power_init(struct dp_power *power);
37 * dp_power_deinit() - turn off regulators and gpios.
39 * @power: instance of power module
40 * return: 0 for success
42 * This API turns off power and regulators.
44 int dp_power_deinit(struct dp_power *power);
47 * dp_power_clk_status() - display controller clocks status
49 * @power: instance of power module
50 * @pm_type: type of pm, core/ctrl/phy
51 * return: status of power clocks
53 * This API return status of DP clocks
56 int dp_power_clk_status(struct dp_power *dp_power, enum dp_pm_type pm_type);
59 * dp_power_clk_enable() - enable display controller clocks
61 * @power: instance of power module
62 * @pm_type: type of pm, core/ctrl/phy
63 * @enable: enables or disables
64 * return: pointer to allocated power module data
66 * This API will call setrate and enable for DP clocks
69 int dp_power_clk_enable(struct dp_power *power, enum dp_pm_type pm_type,
73 * dp_power_client_init() - initialize clock and regulator modules
75 * @power: instance of power module
76 * return: 0 for success, error for failure.
78 * This API will configure the DisplayPort's clocks and regulator
81 int dp_power_client_init(struct dp_power *power);
84 * dp_power_clinet_deinit() - de-initialize clock and regulator modules
86 * @power: instance of power module
87 * return: 0 for success, error for failure.
89 * This API will de-initialize the DisplayPort's clocks and regulator
92 void dp_power_client_deinit(struct dp_power *power);
95 * dp_power_get() - configure and get the DisplayPort power module data
97 * @parser: instance of parser module
98 * return: pointer to allocated power module data
100 * This API will configure the DisplayPort's power module and provides
101 * methods to be called by the client to configure the power related
104 struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser);
106 #endif /* _DP_POWER_H_ */