From: Sidharth Prabukumar <sidharth.prabukumar@gmail.com>
To: u-boot@lists.denx.de
Cc: Sidharth Prabukumar <sidharth.prabukumar@gmail.com>,
Jaehoon Chung <jh80.chung@samsung.com>
Subject: [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC
Date: Sun, 24 Sep 2023 18:30:22 -0400 [thread overview]
Message-ID: <20230924223022.313107-1-sidharth.prabukumar@gmail.com> (raw)
The MP5416 PMIC's LDO set-value formula is incorrect. This patch fixes
it by using the correct formula.
Signed-off-by: Sidharth Prabukumar <sidharth.prabukumar@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
include/power/mp5416.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.34.1
next reply other threads:[~2023-09-25 0:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231031050407epcas1p250bf5bb525b416e61ca4b9a2425a30b8@epcas1p2.samsung.com>
2023-09-24 22:30 ` Sidharth Prabukumar [this message]
2023-10-31 5:04 ` [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC Jaehoon Chung
2024-10-10 21:34 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230924223022.313107-1-sidharth.prabukumar@gmail.com \
--to=sidharth.prabukumar@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox