From: Sidharth Prabukumar Date: Sun, 24 Sep 2023 22:30:22 +0000 (-0400) Subject: power: mp5416: Fix LDO SVAL for MP5416 PMIC X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=6417ee7ec570b78513fba44b23a7f4a3577338d1;p=u-boot.git 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 Cc: Jaehoon Chung Reviewed-by: Jaehoon Chung --- diff --git a/include/power/mp5416.h b/include/power/mp5416.h index dc096fed3f..4326baaa42 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)