Lines Matching refs:dp_power
24 struct dp_power dp_power; member
61 int dp_power_clk_status(struct dp_power *dp_power, enum dp_pm_type pm_type) in dp_power_clk_status() argument
65 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_clk_status()
69 dp_power->core_clks_on, dp_power->link_clks_on, dp_power->stream_clks_on); in dp_power_clk_status()
72 return dp_power->core_clks_on; in dp_power_clk_status()
75 return dp_power->link_clks_on; in dp_power_clk_status()
78 return dp_power->stream_clks_on; in dp_power_clk_status()
83 int dp_power_clk_enable(struct dp_power *dp_power, in dp_power_clk_enable() argument
90 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_clk_enable()
100 if (pm_type == DP_CORE_PM && dp_power->core_clks_on) { in dp_power_clk_enable()
106 if (pm_type == DP_CTRL_PM && dp_power->link_clks_on) { in dp_power_clk_enable()
112 if (pm_type == DP_STREAM_PM && dp_power->stream_clks_on) { in dp_power_clk_enable()
118 if ((pm_type == DP_CTRL_PM) && (!dp_power->core_clks_on)) { in dp_power_clk_enable()
129 dp_power->core_clks_on = true; in dp_power_clk_enable()
145 dp_power->core_clks_on = enable; in dp_power_clk_enable()
147 dp_power->stream_clks_on = enable; in dp_power_clk_enable()
149 dp_power->link_clks_on = enable; in dp_power_clk_enable()
156 dp_power->stream_clks_on ? "on" : "off", in dp_power_clk_enable()
157 dp_power->link_clks_on ? "on" : "off", in dp_power_clk_enable()
158 dp_power->core_clks_on ? "on" : "off"); in dp_power_clk_enable()
163 int dp_power_client_init(struct dp_power *dp_power) in dp_power_client_init() argument
168 if (!dp_power) { in dp_power_client_init()
173 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_client_init()
184 void dp_power_client_deinit(struct dp_power *dp_power) in dp_power_client_deinit() argument
188 if (!dp_power) { in dp_power_client_deinit()
193 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_client_deinit()
198 int dp_power_init(struct dp_power *dp_power, bool flip) in dp_power_init() argument
203 if (!dp_power) { in dp_power_init()
208 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_init()
212 rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true); in dp_power_init()
225 int dp_power_deinit(struct dp_power *dp_power) in dp_power_deinit() argument
229 power = container_of(dp_power, struct dp_power_private, dp_power); in dp_power_deinit()
231 dp_power_clk_enable(dp_power, DP_CORE_PM, false); in dp_power_deinit()
236 struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser) in dp_power_get()
239 struct dp_power *dp_power; in dp_power_get() local
254 dp_power = &power->dp_power; in dp_power_get()
256 return dp_power; in dp_power_get()