From: Laxman Dewangan <ldewangan@nvidia.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <axel.lin@ingics.com>,
<kishon@ti.com>, <gg@slimlogic.co.uk>,
Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH] regulator: palmas: fix the n_voltages for smps to 122
Date: Wed, 4 Sep 2013 15:20:06 +0530 [thread overview]
Message-ID: <1378288206-20741-1-git-send-email-ldewangan@nvidia.com> (raw)
With the following change
---------
commit ad02e846878ca35e9d3fa584be8ee770e9e14fce
Author: Axel Lin <axel.lin@ingics.com>
regulator: palmas: Return raw register values as the selectors in [get|set]_voltage_sel
Don't adjust the selector in [get|set]_voltage_sel, fix it in list_voltage() instead.
For smps*(except smps10), the vsel reg-value and voltage mapping as below:
----------
The list_voltage() takes the true value of selector which is
programmed in the register. As per smsp voltage table
reg-value volt (uV) ( Assume RANGE is x1 )
0 0
1 500000
2 500000
3 500000
4 500000
5 500000
6 500000 (0.49V + 1 * 0.01V) * RANGE
7 510000 (0.49V + 2 * 0.01V) * RANGE
8 520000 (0.49V + 3 * 0.01V) * RANGE
9 530000 (0.49V + 4 * 0.01V) * RANGE
....
121 1650000 (0.49V + 116 * 0.1) * RANGE
Hence making n_voltages for smps to 122.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/regulator/palmas-regulator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 488dfe7..cb65c6f 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -207,7 +207,7 @@ static unsigned int palmas_smps_ramp_delay[4] = {0, 10000, 5000, 2500};
*
* So they are basically (maxV-minV)/stepV
*/
-#define PALMAS_SMPS_NUM_VOLTAGES 117
+#define PALMAS_SMPS_NUM_VOLTAGES 122
#define PALMAS_SMPS10_NUM_VOLTAGES 2
#define PALMAS_LDO_NUM_VOLTAGES 50
--
1.7.1.1
next reply other threads:[~2013-09-04 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 9:50 Laxman Dewangan [this message]
2013-09-04 9:40 ` [PATCH] regulator: palmas: fix the n_voltages for smps to 122 Mark Brown
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=1378288206-20741-1-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=gg@slimlogic.co.uk \
--cc=kishon@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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