Lines Matching full:pd
18 #define domain_to_rpmpd(domain) container_of(domain, struct rpmpd, pd)
52 struct generic_pm_domain pd; member
76 .pd = { .name = "cx", },
84 .pd = { .name = "cx_ao", },
94 .pd = { .name = "cx", },
102 .pd = { .name = "cx_ao", },
112 .pd = { .name = "cx", },
120 .pd = { .name = "cx_ao", },
130 .pd = { .name = "cx", },
138 .pd = { .name = "cx_ao", },
148 .pd = { .name = "cx", },
156 .pd = { .name = "cx_ao", },
166 .pd = { .name = "cx", },
174 .pd = { .name = "cx_ao", },
183 .pd = { .name = "cx_vfl", },
190 .pd = { .name = "cx_vfl", },
197 .pd = { .name = "cx_vfc", },
204 .pd = { .name = "cx_vfl", },
211 .pd = { .name = "cx_vfc", },
218 .pd = { .name = "cx_vfl", },
225 .pd = { .name = "cx_vfl", },
233 .pd = { .name = "cx", },
241 .pd = { .name = "cx_ao", },
250 .pd = { .name = "cx_vfc", },
258 .pd = { .name = "gfx", },
265 .pd = { .name = "gfx_vfc", },
272 .pd = { .name = "gfx", },
279 .pd = { .name = "gfx_vfc", },
286 .pd = { .name = "gfx", },
293 .pd = { .name = "gfx_vfc", },
302 .pd = { .name = "gx", },
305 .parent = &mx_rwmx0_lvl.pd,
312 .pd = { .name = "gx_ao", },
314 .parent = &mx_rwmx0_lvl_ao.pd,
324 .pd = { .name = "mx", },
332 .pd = { .name = "mx_ao", },
342 .pd = { .name = "mx", },
350 .pd = { .name = "mx_ao", },
360 .pd = { .name = "mx", },
368 .pd = { .name = "mx_ao", },
378 .pd = { .name = "mx", },
386 .pd = { .name = "mx_ao", },
396 .pd = { .name = "mx", },
404 .pd = { .name = "mx_ao", },
414 .pd = { .name = "mx", },
422 .pd = { .name = "mx_ao", },
432 .pd = { .name = "mx", },
440 .pd = { .name = "mx_ao", },
450 .pd = { .name = "mx", },
458 .pd = { .name = "mx_ao", },
467 .pd = { .name = "mx_vfl", },
474 .pd = { .name = "mx_vfl", },
481 .pd = { .name = "mx_vfl", },
490 .pd = { .name = "md", },
498 .pd = { .name = "md_ao", },
508 .pd = { .name = "md", },
516 .pd = { .name = "md_ao", },
525 .pd = { .name = "md_vfc", },
533 .pd = { .name = "lpi_cx", },
540 .pd = { .name = "lpi_cx_vfl", },
548 .pd = { .name = "lpi_mx", },
555 .pd = { .name = "lpi_mx_vfl", },
563 .pd = { .name = "ssc_cx", },
570 .pd = { .name = "ssc_cx", },
577 .pd = { .name = "ssc_cx", },
584 .pd = { .name = "ssc_cx_vfc", },
591 .pd = { .name = "ssc_cx_vfl", },
598 .pd = { .name = "ssc_cx_vfl", },
606 .pd = { .name = "ssc_mx", },
613 .pd = { .name = "ssc_mx", },
620 .pd = { .name = "ssc_mx_vfl", },
627 .pd = { .name = "ssc_mx_vfl", },
959 static int rpmpd_send_enable(struct rpmpd *pd, bool enable) in rpmpd_send_enable() argument
968 pd->res_type, pd->res_id, &req, sizeof(req)); in rpmpd_send_enable()
971 static int rpmpd_send_corner(struct rpmpd *pd, int state, unsigned int corner) in rpmpd_send_corner() argument
974 .key = pd->key, in rpmpd_send_corner()
979 return qcom_rpm_smd_write(rpmpd_smd_rpm, state, pd->res_type, pd->res_id, in rpmpd_send_corner()
983 static void to_active_sleep(struct rpmpd *pd, unsigned int corner, in to_active_sleep() argument
988 if (pd->active_only) in to_active_sleep()
994 static int rpmpd_aggregate_corner(struct rpmpd *pd) in rpmpd_aggregate_corner() argument
997 struct rpmpd *peer = pd->peer; in rpmpd_aggregate_corner()
1003 if (!pd->state_synced) in rpmpd_aggregate_corner()
1004 this_active_corner = this_sleep_corner = pd->max_state - 1; in rpmpd_aggregate_corner()
1006 to_active_sleep(pd, pd->corner, &this_active_corner, &this_sleep_corner); in rpmpd_aggregate_corner()
1014 ret = rpmpd_send_corner(pd, QCOM_SMD_RPM_ACTIVE_STATE, active_corner); in rpmpd_aggregate_corner()
1020 return rpmpd_send_corner(pd, QCOM_SMD_RPM_SLEEP_STATE, sleep_corner); in rpmpd_aggregate_corner()
1026 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_power_on() local
1030 ret = rpmpd_send_enable(pd, true); in rpmpd_power_on()
1034 pd->enabled = true; in rpmpd_power_on()
1036 if (pd->corner) in rpmpd_power_on()
1037 ret = rpmpd_aggregate_corner(pd); in rpmpd_power_on()
1045 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_power_off() local
1049 ret = rpmpd_send_enable(pd, false); in rpmpd_power_off()
1051 pd->enabled = false; in rpmpd_power_off()
1061 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_set_performance() local
1063 if (state > pd->max_state) in rpmpd_set_performance()
1064 state = pd->max_state; in rpmpd_set_performance()
1068 pd->corner = state; in rpmpd_set_performance()
1071 if (!pd->enabled && pd->key != cpu_to_le32(KEY_FLOOR_CORNER) && in rpmpd_set_performance()
1072 pd->key != cpu_to_le32(KEY_FLOOR_LEVEL)) in rpmpd_set_performance()
1075 return rpmpd_aggregate_corner(pd); in rpmpd_set_performance()
1118 rpmpds[i]->pd.power_off = rpmpd_power_off; in rpmpd_probe()
1119 rpmpds[i]->pd.power_on = rpmpd_power_on; in rpmpd_probe()
1120 rpmpds[i]->pd.set_performance_state = rpmpd_set_performance; in rpmpd_probe()
1121 rpmpds[i]->pd.flags = GENPD_FLAG_ACTIVE_WAKEUP; in rpmpd_probe()
1122 pm_genpd_init(&rpmpds[i]->pd, NULL, true); in rpmpd_probe()
1124 data->domains[i] = &rpmpds[i]->pd; in rpmpd_probe()
1133 pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd); in rpmpd_probe()
1143 struct rpmpd *pd; in rpmpd_sync_state() local
1149 pd = rpmpds[i]; in rpmpd_sync_state()
1150 if (!pd) in rpmpd_sync_state()
1153 pd->state_synced = true; in rpmpd_sync_state()
1155 if (!pd->enabled) in rpmpd_sync_state()
1156 pd->corner = 0; in rpmpd_sync_state()
1158 ret = rpmpd_aggregate_corner(pd); in rpmpd_sync_state()
1160 dev_err(dev, "failed to sync %s: %d\n", pd->pd.name, ret); in rpmpd_sync_state()