The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Re: [PATCH] regulator: palmas: fix the n_voltages for smps to 122
  2013-09-04  9:50 [PATCH] regulator: palmas: fix the n_voltages for smps to 122 Laxman Dewangan
@ 2013-09-04  9:40 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-09-04  9:40 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: lgirdwood, linux-kernel, axel.lin, kishon, gg

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

On Wed, Sep 04, 2013 at 03:20:06PM +0530, Laxman Dewangan wrote:
> With the following change
> ---------
> commit ad02e846878ca35e9d3fa584be8ee770e9e14fce
> Author: Axel Lin <axel.lin@ingics.com>

Applied, thanks.  There is no need to include the entire commit message,
just the summary will do.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] regulator: palmas: fix the n_voltages for smps to 122
@ 2013-09-04  9:50 Laxman Dewangan
  2013-09-04  9:40 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Laxman Dewangan @ 2013-09-04  9:50 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: linux-kernel, axel.lin, kishon, gg, Laxman Dewangan

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-04  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04  9:50 [PATCH] regulator: palmas: fix the n_voltages for smps to 122 Laxman Dewangan
2013-09-04  9:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox