summaryrefslogtreecommitdiff
path: root/include/power
diff options
context:
space:
mode:
authorSidharth Prabukumar <[email protected]>2023-09-24 18:30:22 -0400
committerTom Rini <[email protected]>2024-10-10 11:59:50 -0600
commit6417ee7ec570b78513fba44b23a7f4a3577338d1 (patch)
treeb3e27e0e01694e3d230de2acc6b7a738d33a9980 /include/power
parentdb11dfdac5b2b238d7944ef7fa924d9dc7d01394 (diff)
power: mp5416: Fix LDO SVAL for MP5416 PMIC
The MP5416 PMIC's LDO set-value formula is incorrect. This patch fixes it by using the correct formula. Signed-off-by: Sidharth Prabukumar <[email protected]> Cc: Jaehoon Chung <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
Diffstat (limited to 'include/power')
-rw-r--r--include/power/mp5416.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/power/mp5416.h b/include/power/mp5416.h
index dc096fed3f2..4326baaa42a 100644
--- a/include/power/mp5416.h
+++ b/include/power/mp5416.h
@@ -32,7 +32,7 @@ enum {
#define MP5416_VSET_SW3_GVAL(x) ((((x) & 0x7f) * 12500) + 600000)
#define MP5416_VSET_SW4_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
#define MP5416_VSET_LDO_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
-#define MP5416_VSET_LDO_SVAL(x) ((((x) & 0x7f) * 25000) + 800000)
+#define MP5416_VSET_LDO_SVAL(x) (((x) - 800000) / 25000)
#define MP5416_VSET_SW1_SVAL(x) (((x) - 600000) / 12500)
#define MP5416_VSET_SW2_SVAL(x) (((x) - 800000) / 25000)
#define MP5416_VSET_SW3_SVAL(x) (((x) - 600000) / 12500)