Lines Matching full:rpmhpd
18 #include <dt-bindings/power/qcom,rpmhpd.h>
20 #define domain_to_rpmhpd(domain) container_of(domain, struct rpmhpd, pd)
25 * struct rpmhpd - top level RPMh power domain resource data structure
43 * @state_synced: Indicator that sync_state has been invoked for the rpmhpd resource
46 struct rpmhpd { struct
50 struct rpmhpd *peer; argument
65 struct rpmhpd **rpmhpds; argument
73 static struct rpmhpd cx_ao;
74 static struct rpmhpd mx;
75 static struct rpmhpd mx_ao;
76 static struct rpmhpd cx = {
82 static struct rpmhpd cx_ao = {
89 static struct rpmhpd cx_ao_w_mx_parent;
90 static struct rpmhpd cx_w_mx_parent = {
97 static struct rpmhpd cx_ao_w_mx_parent = {
105 static struct rpmhpd ebi = {
110 static struct rpmhpd gfx = {
115 static struct rpmhpd lcx = {
120 static struct rpmhpd lmx = {
125 static struct rpmhpd mmcx_ao;
126 static struct rpmhpd mmcx = {
132 static struct rpmhpd mmcx_ao = {
139 static struct rpmhpd mmcx_ao_w_cx_parent;
140 static struct rpmhpd mmcx_w_cx_parent = {
147 static struct rpmhpd mmcx_ao_w_cx_parent = {
155 static struct rpmhpd mss = {
160 static struct rpmhpd mx_ao;
161 static struct rpmhpd mx = {
167 static struct rpmhpd mx_ao = {
174 static struct rpmhpd mxc_ao;
175 static struct rpmhpd mxc = {
182 static struct rpmhpd mxc_ao = {
190 static struct rpmhpd nsp = {
195 static struct rpmhpd nsp0 = {
200 static struct rpmhpd nsp1 = {
205 static struct rpmhpd nsp2 = {
210 static struct rpmhpd qphy = {
215 static struct rpmhpd gmxc = {
221 static struct rpmhpd *sa8540p_rpmhpds[] = {
240 static struct rpmhpd *sa8775p_rpmhpds[] = {
263 static struct rpmhpd *sdm670_rpmhpds[] = {
280 static struct rpmhpd *sdm845_rpmhpds[] = {
298 static struct rpmhpd *sdx55_rpmhpds[] = {
310 static struct rpmhpd *sdx65_rpmhpds[] = {
325 static struct rpmhpd *sdx75_rpmhpds[] = {
340 static struct rpmhpd *sm6350_rpmhpds[] = {
355 static struct rpmhpd *sm7150_rpmhpds[] = {
372 static struct rpmhpd *sm8150_rpmhpds[] = {
391 static struct rpmhpd *sa8155p_rpmhpds[] = {
407 static struct rpmhpd *sm8250_rpmhpds[] = {
426 static struct rpmhpd *sm8350_rpmhpds[] = {
448 static struct rpmhpd *sm8450_rpmhpds[] = {
470 static struct rpmhpd *sm8550_rpmhpds[] = {
493 static struct rpmhpd *sm8650_rpmhpds[] = {
517 static struct rpmhpd *qdu1000_rpmhpds[] = {
530 static struct rpmhpd *sc7180_rpmhpds[] = {
547 static struct rpmhpd *sc7280_rpmhpds[] = {
565 static struct rpmhpd *sc8180x_rpmhpds[] = {
585 static struct rpmhpd *sc8280xp_rpmhpds[] = {
606 static struct rpmhpd *x1e80100_rpmhpds[] = {
628 { .compatible = "qcom,qdu1000-rpmhpd", .data = &qdu1000_desc },
629 { .compatible = "qcom,sa8155p-rpmhpd", .data = &sa8155p_desc },
630 { .compatible = "qcom,sa8540p-rpmhpd", .data = &sa8540p_desc },
631 { .compatible = "qcom,sa8775p-rpmhpd", .data = &sa8775p_desc },
632 { .compatible = "qcom,sc7180-rpmhpd", .data = &sc7180_desc },
633 { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc },
634 { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc },
635 { .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc },
636 { .compatible = "qcom,sdm670-rpmhpd", .data = &sdm670_desc },
637 { .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc },
638 { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc},
639 { .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc},
640 { .compatible = "qcom,sdx75-rpmhpd", .data = &sdx75_desc},
641 { .compatible = "qcom,sm6350-rpmhpd", .data = &sm6350_desc },
642 { .compatible = "qcom,sm7150-rpmhpd", .data = &sm7150_desc },
643 { .compatible = "qcom,sm8150-rpmhpd", .data = &sm8150_desc },
644 { .compatible = "qcom,sm8250-rpmhpd", .data = &sm8250_desc },
645 { .compatible = "qcom,sm8350-rpmhpd", .data = &sm8350_desc },
646 { .compatible = "qcom,sm8450-rpmhpd", .data = &sm8450_desc },
647 { .compatible = "qcom,sm8550-rpmhpd", .data = &sm8550_desc },
648 { .compatible = "qcom,sm8650-rpmhpd", .data = &sm8650_desc },
649 { .compatible = "qcom,x1e80100-rpmhpd", .data = &x1e80100_desc },
654 static int rpmhpd_send_corner(struct rpmhpd *pd, int state, in rpmhpd_send_corner()
672 static void to_active_sleep(struct rpmhpd *pd, unsigned int corner, in to_active_sleep()
692 static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner) in rpmhpd_aggregate_corner()
695 struct rpmhpd *peer = pd->peer; in rpmhpd_aggregate_corner()
743 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_power_on()
761 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_power_off()
778 struct rpmhpd *pd = domain_to_rpmhpd(domain); in rpmhpd_set_performance_state()
809 static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd) in rpmhpd_update_level_mapping() argument
814 buf = cmd_db_read_aux_data(rpmhpd->res_name, &rpmhpd->level_count); in rpmhpd_update_level_mapping()
819 rpmhpd->level_count >>= 1; in rpmhpd_update_level_mapping()
821 if (rpmhpd->level_count > RPMH_ARC_MAX_LEVELS) in rpmhpd_update_level_mapping()
824 for (i = 0; i < rpmhpd->level_count; i++) { in rpmhpd_update_level_mapping()
825 if (rpmhpd->skip_retention_level && buf[i] == RPMH_REGULATOR_LEVEL_RETENTION) in rpmhpd_update_level_mapping()
828 rpmhpd->level[i] = buf[i]; in rpmhpd_update_level_mapping()
831 if (!rpmhpd->level[rpmhpd->enable_corner] && rpmhpd->level[i]) in rpmhpd_update_level_mapping()
832 rpmhpd->enable_corner = i; in rpmhpd_update_level_mapping()
838 if (i > 0 && rpmhpd->level[i] == 0) { in rpmhpd_update_level_mapping()
839 rpmhpd->level_count = i; in rpmhpd_update_level_mapping()
842 pr_debug("%s: ARC hlvl=%2d --> vlvl=%4u\n", rpmhpd->res_name, i, in rpmhpd_update_level_mapping()
843 rpmhpd->level[i]); in rpmhpd_update_level_mapping()
855 struct rpmhpd **rpmhpds; in rpmhpd_probe()
921 struct rpmhpd **rpmhpds = desc->rpmhpds; in rpmhpd_sync_state()
923 struct rpmhpd *pd; in rpmhpd_sync_state()
948 .name = "qcom-rpmhpd",