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 * @flip: bool for flipping gpio direction
30 * return: 0 if success or error if failure.
32 * This API will turn on the regulators and configures gpio's
35 int dp_power_init(struct dp_power
*power
, bool flip
);
38 * dp_power_deinit() - turn off regulators and gpios.
40 * @power: instance of power module
41 * return: 0 for success
43 * This API turns off power and regulators.
45 int dp_power_deinit(struct dp_power
*power
);
48 * dp_power_clk_status() - display controller clocks status
50 * @power: instance of power module
51 * @pm_type: type of pm, core/ctrl/phy
52 * return: status of power clocks
54 * This API return status of DP clocks
57 int dp_power_clk_status(struct dp_power
*dp_power
, enum dp_pm_type pm_type
);
60 * dp_power_clk_enable() - enable display controller clocks
62 * @power: instance of power module
63 * @pm_type: type of pm, core/ctrl/phy
64 * @enable: enables or disables
65 * return: pointer to allocated power module data
67 * This API will call setrate and enable for DP clocks
70 int dp_power_clk_enable(struct dp_power
*power
, enum dp_pm_type pm_type
,
74 * dp_power_client_init() - initialize clock and regulator modules
76 * @power: instance of power module
77 * return: 0 for success, error for failure.
79 * This API will configure the DisplayPort's clocks and regulator
82 int dp_power_client_init(struct dp_power
*power
);
85 * dp_power_clinet_deinit() - de-initialize clock and regulator modules
87 * @power: instance of power module
88 * return: 0 for success, error for failure.
90 * This API will de-initialize the DisplayPort's clocks and regulator
93 void dp_power_client_deinit(struct dp_power
*power
);
96 * dp_power_get() - configure and get the DisplayPort power module data
98 * @parser: instance of parser module
99 * return: pointer to allocated power module data
101 * This API will configure the DisplayPort's power module and provides
102 * methods to be called by the client to configure the power related
105 struct dp_power
*dp_power_get(struct device
*dev
, struct dp_parser
*parser
);
107 #endif /* _DP_POWER_H_ */