Lines Matching refs:pd
19 #define domain_to_rpmhpd(domain) container_of(domain, struct rpmhpd, pd)
44 struct generic_pm_domain pd; member
67 .pd = { .name = "ebi", },
72 .pd = { .name = "lmx", },
77 .pd = { .name = "lcx", },
82 .pd = { .name = "gfx", },
87 .pd = { .name = "mss", },
93 .pd = { .name = "mx", },
99 .pd = { .name = "mx_ao", },
107 .pd = { .name = "cx", },
109 .parent = &sdm845_mx.pd,
114 .pd = { .name = "cx_ao", },
117 .parent = &sdm845_mx_ao.pd,
154 .pd = { .name = "mmcx", },
160 .pd = { .name = "mmcx_ao", },
206 .pd = { .name = "mxc", },
212 .pd = { .name = "mxc_ao", },
307 static int rpmhpd_send_corner(struct rpmhpd *pd, int state, in rpmhpd_send_corner() argument
311 .addr = pd->addr, in rpmhpd_send_corner()
320 return rpmh_write(pd->dev, state, &cmd, 1); in rpmhpd_send_corner()
322 return rpmh_write_async(pd->dev, state, &cmd, 1); in rpmhpd_send_corner()
325 static void to_active_sleep(struct rpmhpd *pd, unsigned int corner, in to_active_sleep() argument
330 if (pd->active_only) in to_active_sleep()
345 static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner) in rpmhpd_aggregate_corner() argument
348 struct rpmhpd *peer = pd->peer; in rpmhpd_aggregate_corner()
353 to_active_sleep(pd, corner, &this_active_corner, &this_sleep_corner); in rpmhpd_aggregate_corner()
361 ret = rpmhpd_send_corner(pd, RPMH_ACTIVE_ONLY_STATE, active_corner, in rpmhpd_aggregate_corner()
362 active_corner > pd->active_corner); in rpmhpd_aggregate_corner()
366 pd->active_corner = active_corner; in rpmhpd_aggregate_corner()
371 ret = rpmhpd_send_corner(pd, RPMH_WAKE_ONLY_STATE, in rpmhpd_aggregate_corner()
378 return rpmhpd_send_corner(pd, RPMH_SLEEP_STATE, sleep_corner, in rpmhpd_aggregate_corner()
387 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_power_on() local
392 if (pd->corner) in rpmhpd_power_on()
393 ret = rpmhpd_aggregate_corner(pd, pd->corner); in rpmhpd_power_on()
396 pd->enabled = true; in rpmhpd_power_on()
405 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_power_off() local
410 ret = rpmhpd_aggregate_corner(pd, 0); in rpmhpd_power_off()
412 pd->enabled = false; in rpmhpd_power_off()
422 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_set_performance_state() local
427 for (i = 0; i < pd->level_count; i++) in rpmhpd_set_performance_state()
428 if (level <= pd->level[i]) in rpmhpd_set_performance_state()
435 if (i == pd->level_count) in rpmhpd_set_performance_state()
438 if (pd->enabled) { in rpmhpd_set_performance_state()
439 ret = rpmhpd_aggregate_corner(pd, i); in rpmhpd_set_performance_state()
444 pd->corner = i; in rpmhpd_set_performance_state()
541 rpmhpds[i]->pd.power_off = rpmhpd_power_off; in rpmhpd_probe()
542 rpmhpds[i]->pd.power_on = rpmhpd_power_on; in rpmhpd_probe()
543 rpmhpds[i]->pd.set_performance_state = rpmhpd_set_performance_state; in rpmhpd_probe()
544 rpmhpds[i]->pd.opp_to_performance_state = rpmhpd_get_performance_state; in rpmhpd_probe()
545 pm_genpd_init(&rpmhpds[i]->pd, NULL, true); in rpmhpd_probe()
547 data->domains[i] = &rpmhpds[i]->pd; in rpmhpd_probe()
556 &rpmhpds[i]->pd); in rpmhpd_probe()