Skip to content

Commit 4ca45af

Browse files
mlehtimaandersson
authored andcommitted
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
Recent change to handle platforms with only single power domain broke pronto-v3 which requires power domains and doesn't have fallback voltage regulators in case power domains are missing. Add a check to verify the number of fallback voltage regulators before using the code which handles single power domain situation. Fixes: 65991ea ("remoteproc: qcom_wcnss: Handle platforms with only single power domain") Signed-off-by: Matti Lehtimäki <[email protected]> Tested-by: Luca Weiss <[email protected]> # sdm632-fairphone-fp3 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 0af2f6b commit 4ca45af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/remoteproc/qcom_wcnss.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,8 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
456456
if (wcnss->num_pds) {
457457
info += wcnss->num_pds;
458458
/* Handle single power domain case */
459-
num_vregs += num_pd_vregs - wcnss->num_pds;
459+
if (wcnss->num_pds < num_pd_vregs)
460+
num_vregs += num_pd_vregs - wcnss->num_pds;
460461
} else {
461462
num_vregs += num_pd_vregs;
462463
}

0 commit comments

Comments
 (0)