Lines Matching full:pd
17 #define domain_to_rpmpd(domain) container_of(domain, struct rpmpd, pd)
49 struct generic_pm_domain pd; member
74 .pd = { .name = "cx", },
82 .pd = { .name = "cx_ao", },
92 .pd = { .name = "cx", },
100 .pd = { .name = "cx_ao", },
110 .pd = { .name = "cx", },
118 .pd = { .name = "cx_ao", },
128 .pd = { .name = "cx", },
136 .pd = { .name = "cx_ao", },
146 .pd = { .name = "cx", },
154 .pd = { .name = "cx_ao", },
164 .pd = { .name = "cx", },
172 .pd = { .name = "cx_ao", },
181 .pd = { .name = "cx_vfl", },
188 .pd = { .name = "cx_vfl", },
195 .pd = { .name = "cx_vfc", },
202 .pd = { .name = "cx_vfl", },
209 .pd = { .name = "cx_vfc", },
216 .pd = { .name = "cx_vfl", },
223 .pd = { .name = "cx_vfl", },
231 .pd = { .name = "gfx", },
238 .pd = { .name = "gfx_vfc", },
247 .pd = { .name = "gx", },
250 .parent = &mx_rwmx0_lvl.pd,
257 .pd = { .name = "gx_ao", },
259 .parent = &mx_rwmx0_lvl_ao.pd,
269 .pd = { .name = "mx", },
277 .pd = { .name = "mx_ao", },
287 .pd = { .name = "mx", },
295 .pd = { .name = "mx_ao", },
305 .pd = { .name = "mx", },
313 .pd = { .name = "mx_ao", },
323 .pd = { .name = "mx", },
331 .pd = { .name = "mx_ao", },
341 .pd = { .name = "mx", },
349 .pd = { .name = "mx_ao", },
359 .pd = { .name = "mx", },
367 .pd = { .name = "mx_ao", },
377 .pd = { .name = "mx", },
385 .pd = { .name = "mx_ao", },
395 .pd = { .name = "mx", },
403 .pd = { .name = "mx_ao", },
412 .pd = { .name = "mx_vfl", },
419 .pd = { .name = "mx_vfl", },
426 .pd = { .name = "mx_vfl", },
435 .pd = { .name = "md", },
443 .pd = { .name = "md_ao", },
453 .pd = { .name = "md", },
461 .pd = { .name = "md_ao", },
470 .pd = { .name = "md_vfc", },
478 .pd = { .name = "lpi_cx", },
485 .pd = { .name = "lpi_cx_vfl", },
493 .pd = { .name = "lpi_mx", },
500 .pd = { .name = "lpi_mx_vfl", },
508 .pd = { .name = "ssc_cx", },
515 .pd = { .name = "ssc_cx", },
522 .pd = { .name = "ssc_cx", },
529 .pd = { .name = "ssc_cx_vfc", },
536 .pd = { .name = "ssc_cx_vfl", },
543 .pd = { .name = "ssc_cx_vfl", },
551 .pd = { .name = "ssc_mx", },
558 .pd = { .name = "ssc_mx", },
565 .pd = { .name = "ssc_mx_vfl", },
572 .pd = { .name = "ssc_mx_vfl", },
874 static int rpmpd_send_enable(struct rpmpd *pd, bool enable) in rpmpd_send_enable() argument
882 return qcom_rpm_smd_write(pd->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpmpd_send_enable()
883 pd->res_type, pd->res_id, &req, sizeof(req)); in rpmpd_send_enable()
886 static int rpmpd_send_corner(struct rpmpd *pd, int state, unsigned int corner) in rpmpd_send_corner() argument
889 .key = pd->key, in rpmpd_send_corner()
894 return qcom_rpm_smd_write(pd->rpm, state, pd->res_type, pd->res_id, in rpmpd_send_corner()
898 static void to_active_sleep(struct rpmpd *pd, unsigned int corner, in to_active_sleep() argument
903 if (pd->active_only) in to_active_sleep()
909 static int rpmpd_aggregate_corner(struct rpmpd *pd) in rpmpd_aggregate_corner() argument
912 struct rpmpd *peer = pd->peer; in rpmpd_aggregate_corner()
918 if (!pd->state_synced) in rpmpd_aggregate_corner()
919 this_active_corner = this_sleep_corner = pd->max_state - 1; in rpmpd_aggregate_corner()
921 to_active_sleep(pd, pd->corner, &this_active_corner, &this_sleep_corner); in rpmpd_aggregate_corner()
929 ret = rpmpd_send_corner(pd, QCOM_SMD_RPM_ACTIVE_STATE, active_corner); in rpmpd_aggregate_corner()
935 return rpmpd_send_corner(pd, QCOM_SMD_RPM_SLEEP_STATE, sleep_corner); in rpmpd_aggregate_corner()
941 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_power_on() local
945 ret = rpmpd_send_enable(pd, true); in rpmpd_power_on()
949 pd->enabled = true; in rpmpd_power_on()
951 if (pd->corner) in rpmpd_power_on()
952 ret = rpmpd_aggregate_corner(pd); in rpmpd_power_on()
963 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_power_off() local
967 ret = rpmpd_send_enable(pd, false); in rpmpd_power_off()
969 pd->enabled = false; in rpmpd_power_off()
980 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_set_performance() local
982 if (state > pd->max_state) in rpmpd_set_performance()
983 state = pd->max_state; in rpmpd_set_performance()
987 pd->corner = state; in rpmpd_set_performance()
990 if (!pd->enabled && pd->key != cpu_to_le32(KEY_FLOOR_CORNER) && in rpmpd_set_performance()
991 pd->key != cpu_to_le32(KEY_FLOOR_LEVEL)) in rpmpd_set_performance()
994 ret = rpmpd_aggregate_corner(pd); in rpmpd_set_performance()
1044 rpmpds[i]->pd.power_off = rpmpd_power_off; in rpmpd_probe()
1045 rpmpds[i]->pd.power_on = rpmpd_power_on; in rpmpd_probe()
1046 rpmpds[i]->pd.set_performance_state = rpmpd_set_performance; in rpmpd_probe()
1047 rpmpds[i]->pd.flags = GENPD_FLAG_ACTIVE_WAKEUP; in rpmpd_probe()
1048 pm_genpd_init(&rpmpds[i]->pd, NULL, true); in rpmpd_probe()
1050 data->domains[i] = &rpmpds[i]->pd; in rpmpd_probe()
1059 pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd); in rpmpd_probe()
1069 struct rpmpd *pd; in rpmpd_sync_state() local
1075 pd = rpmpds[i]; in rpmpd_sync_state()
1076 if (!pd) in rpmpd_sync_state()
1079 pd->state_synced = true; in rpmpd_sync_state()
1081 if (!pd->enabled) in rpmpd_sync_state()
1082 pd->corner = 0; in rpmpd_sync_state()
1084 ret = rpmpd_aggregate_corner(pd); in rpmpd_sync_state()
1086 dev_err(dev, "failed to sync %s: %d\n", pd->pd.name, ret); in rpmpd_sync_state()