• Home
  • Raw
  • Download

Lines Matching full:pd

19 #define domain_to_rpmhpd(domain) container_of(domain, struct rpmhpd, pd)
26 * @pd: generic_pm_domain corrresponding to the power domain
45 struct generic_pm_domain pd; member
69 .pd = { .name = "ebi", },
74 .pd = { .name = "lmx", },
79 .pd = { .name = "lcx", },
84 .pd = { .name = "gfx", },
89 .pd = { .name = "mss", },
95 .pd = { .name = "mx", },
101 .pd = { .name = "mx_ao", },
109 .pd = { .name = "cx", },
111 .parent = &sdm845_mx.pd,
116 .pd = { .name = "cx_ao", },
119 .parent = &sdm845_mx_ao.pd,
144 .pd = { .name = "mmcx", },
150 .pd = { .name = "mmcx_ao", },
219 static int rpmhpd_send_corner(struct rpmhpd *pd, int state, in rpmhpd_send_corner() argument
223 .addr = pd->addr, in rpmhpd_send_corner()
232 return rpmh_write(pd->dev, state, &cmd, 1); in rpmhpd_send_corner()
234 return rpmh_write_async(pd->dev, state, &cmd, 1); in rpmhpd_send_corner()
237 static void to_active_sleep(struct rpmhpd *pd, unsigned int corner, in to_active_sleep() argument
242 if (pd->active_only) in to_active_sleep()
257 static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner) in rpmhpd_aggregate_corner() argument
260 struct rpmhpd *peer = pd->peer; in rpmhpd_aggregate_corner()
265 to_active_sleep(pd, corner, &this_active_corner, &this_sleep_corner); in rpmhpd_aggregate_corner()
273 ret = rpmhpd_send_corner(pd, RPMH_ACTIVE_ONLY_STATE, active_corner, in rpmhpd_aggregate_corner()
274 active_corner > pd->active_corner); in rpmhpd_aggregate_corner()
278 pd->active_corner = active_corner; in rpmhpd_aggregate_corner()
283 ret = rpmhpd_send_corner(pd, RPMH_WAKE_ONLY_STATE, in rpmhpd_aggregate_corner()
290 return rpmhpd_send_corner(pd, RPMH_SLEEP_STATE, sleep_corner, in rpmhpd_aggregate_corner()
299 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_power_on() local
305 corner = max(pd->corner, pd->enable_corner); in rpmhpd_power_on()
306 ret = rpmhpd_aggregate_corner(pd, corner); in rpmhpd_power_on()
308 pd->enabled = true; in rpmhpd_power_on()
317 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_power_off() local
322 ret = rpmhpd_aggregate_corner(pd, 0); in rpmhpd_power_off()
324 pd->enabled = false; in rpmhpd_power_off()
334 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_set_performance_state() local
339 for (i = 0; i < pd->level_count; i++) in rpmhpd_set_performance_state()
340 if (level <= pd->level[i]) in rpmhpd_set_performance_state()
347 if (i == pd->level_count) in rpmhpd_set_performance_state()
350 if (pd->enabled) { in rpmhpd_set_performance_state()
352 if (i < pd->enable_corner) in rpmhpd_set_performance_state()
353 i = pd->enable_corner; in rpmhpd_set_performance_state()
355 ret = rpmhpd_aggregate_corner(pd, i); in rpmhpd_set_performance_state()
360 pd->corner = i; in rpmhpd_set_performance_state()
461 rpmhpds[i]->pd.power_off = rpmhpd_power_off; in rpmhpd_probe()
462 rpmhpds[i]->pd.power_on = rpmhpd_power_on; in rpmhpd_probe()
463 rpmhpds[i]->pd.set_performance_state = rpmhpd_set_performance_state; in rpmhpd_probe()
464 rpmhpds[i]->pd.opp_to_performance_state = rpmhpd_get_performance_state; in rpmhpd_probe()
465 pm_genpd_init(&rpmhpds[i]->pd, NULL, true); in rpmhpd_probe()
467 data->domains[i] = &rpmhpds[i]->pd; in rpmhpd_probe()
476 &rpmhpds[i]->pd); in rpmhpd_probe()