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", },
163 .pd = { .name = "cx_vfl", },
170 .pd = { .name = "cx_vfl", },
177 .pd = { .name = "cx_vfc", },
184 .pd = { .name = "cx_vfc", },
191 .pd = { .name = "cx_vfl", },
198 .pd = { .name = "cx_vfl", },
206 .pd = { .name = "gfx", },
213 .pd = { .name = "gfx_vfc", },
222 .pd = { .name = "gx", },
225 .parent = &mx_rwmx0_lvl.pd,
232 .pd = { .name = "gx_ao", },
234 .parent = &mx_rwmx0_lvl_ao.pd,
244 .pd = { .name = "mx", },
252 .pd = { .name = "mx_ao", },
262 .pd = { .name = "mx", },
270 .pd = { .name = "mx_ao", },
280 .pd = { .name = "mx", },
288 .pd = { .name = "mx_ao", },
298 .pd = { .name = "mx", },
306 .pd = { .name = "mx_ao", },
316 .pd = { .name = "mx", },
324 .pd = { .name = "mx_ao", },
334 .pd = { .name = "mx", },
342 .pd = { .name = "mx_ao", },
351 .pd = { .name = "mx_vfl", },
358 .pd = { .name = "mx_vfl", },
365 .pd = { .name = "mx_vfl", },
374 .pd = { .name = "md", },
382 .pd = { .name = "md_ao", },
392 .pd = { .name = "md", },
400 .pd = { .name = "md_ao", },
409 .pd = { .name = "md_vfc", },
417 .pd = { .name = "lpi_cx", },
424 .pd = { .name = "lpi_cx_vfl", },
432 .pd = { .name = "lpi_mx", },
439 .pd = { .name = "lpi_mx_vfl", },
447 .pd = { .name = "ssc_cx", },
454 .pd = { .name = "ssc_cx", },
461 .pd = { .name = "ssc_cx", },
468 .pd = { .name = "ssc_cx_vfc", },
475 .pd = { .name = "ssc_cx_vfl", },
482 .pd = { .name = "ssc_cx_vfl", },
490 .pd = { .name = "ssc_mx", },
497 .pd = { .name = "ssc_mx", },
504 .pd = { .name = "ssc_mx_vfl", },
511 .pd = { .name = "ssc_mx_vfl", },
783 static int rpmpd_send_enable(struct rpmpd *pd, bool enable) in rpmpd_send_enable() argument
791 return qcom_rpm_smd_write(pd->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpmpd_send_enable()
792 pd->res_type, pd->res_id, &req, sizeof(req)); in rpmpd_send_enable()
795 static int rpmpd_send_corner(struct rpmpd *pd, int state, unsigned int corner) in rpmpd_send_corner() argument
798 .key = pd->key, in rpmpd_send_corner()
803 return qcom_rpm_smd_write(pd->rpm, state, pd->res_type, pd->res_id, in rpmpd_send_corner()
807 static void to_active_sleep(struct rpmpd *pd, unsigned int corner, in to_active_sleep() argument
812 if (pd->active_only) in to_active_sleep()
818 static int rpmpd_aggregate_corner(struct rpmpd *pd) in rpmpd_aggregate_corner() argument
821 struct rpmpd *peer = pd->peer; in rpmpd_aggregate_corner()
827 if (!pd->state_synced) in rpmpd_aggregate_corner()
828 this_active_corner = this_sleep_corner = pd->max_state - 1; in rpmpd_aggregate_corner()
830 to_active_sleep(pd, pd->corner, &this_active_corner, &this_sleep_corner); in rpmpd_aggregate_corner()
838 ret = rpmpd_send_corner(pd, QCOM_SMD_RPM_ACTIVE_STATE, active_corner); in rpmpd_aggregate_corner()
844 return rpmpd_send_corner(pd, QCOM_SMD_RPM_SLEEP_STATE, sleep_corner); in rpmpd_aggregate_corner()
850 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_power_on() local
854 ret = rpmpd_send_enable(pd, true); in rpmpd_power_on()
858 pd->enabled = true; in rpmpd_power_on()
860 if (pd->corner) in rpmpd_power_on()
861 ret = rpmpd_aggregate_corner(pd); in rpmpd_power_on()
872 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_power_off() local
876 ret = rpmpd_send_enable(pd, false); in rpmpd_power_off()
878 pd->enabled = false; in rpmpd_power_off()
889 struct rpmpd *pd = domain_to_rpmpd(domain); in rpmpd_set_performance() local
891 if (state > pd->max_state) in rpmpd_set_performance()
892 state = pd->max_state; in rpmpd_set_performance()
896 pd->corner = state; in rpmpd_set_performance()
899 if (!pd->enabled && pd->key != cpu_to_le32(KEY_FLOOR_CORNER) && in rpmpd_set_performance()
900 pd->key != cpu_to_le32(KEY_FLOOR_LEVEL)) in rpmpd_set_performance()
903 ret = rpmpd_aggregate_corner(pd); in rpmpd_set_performance()
959 rpmpds[i]->pd.power_off = rpmpd_power_off; in rpmpd_probe()
960 rpmpds[i]->pd.power_on = rpmpd_power_on; in rpmpd_probe()
961 rpmpds[i]->pd.set_performance_state = rpmpd_set_performance; in rpmpd_probe()
962 rpmpds[i]->pd.opp_to_performance_state = rpmpd_get_performance; in rpmpd_probe()
963 pm_genpd_init(&rpmpds[i]->pd, NULL, true); in rpmpd_probe()
965 data->domains[i] = &rpmpds[i]->pd; in rpmpd_probe()
974 pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd); in rpmpd_probe()
984 struct rpmpd *pd; in rpmpd_sync_state() local
990 pd = rpmpds[i]; in rpmpd_sync_state()
991 if (!pd) in rpmpd_sync_state()
994 pd->state_synced = true; in rpmpd_sync_state()
996 if (!pd->enabled) in rpmpd_sync_state()
997 pd->corner = 0; in rpmpd_sync_state()
999 ret = rpmpd_aggregate_corner(pd); in rpmpd_sync_state()
1001 dev_err(dev, "failed to sync %s: %d\n", pd->pd.name, ret); in rpmpd_sync_state()