]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: palmas: fix the n_voltages for smps to 122
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 4 Sep 2013 09:50:06 +0000 (15:20 +0530)
committerMark Brown <broonie@linaro.org>
Wed, 4 Sep 2013 09:39:43 +0000 (10:39 +0100)
commit30e7ebbe6663f573d0e6f29e490cc1c4f3fe12c5
tree0e1ad1bf68da380e074530b7caa3c5da70e259ce
parentdad6c4bd18873cbd6370048e8b37bba8a1d98f54
regulator: palmas: fix the n_voltages for smps to 122

With the following change
---------
commit ecca3c66ca8cb272aa228f4f05d9f8002b6b0aae
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/palmas-regulator.c