regulator: palmas; correct PALMAS_SMPS_NUM_VOLTAGES
Shu Zhang [Fri, 13 Sep 2013 14:32:59 +0000 (22:32 +0800)]
Setting PALMAS_SMPS_NUM_VOLTAGES to 122, original value was 117.

For smps*(except smps10), the vsel reg-value and voltage mapping as
below:

    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
        ....

For max_uV = 3300000, reg-value should be 121, and PALMAS_NUM_VOLTAGES
should be 122.

Bug 1365109
Bug 1366263

Change-Id: I039777b553dbfc0297c9a4da780abc165108e274
Reviewed-on: http://git-master/r/274417
Reviewed-by: Shu Zhang <chazhang@nvidia.com>
Tested-by: Shu Zhang <chazhang@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/regulator/palmas-regulator.c

index a425c65..b34e502 100644 (file)
@@ -294,7 +294,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