summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2017-02-03 17:04:08 +0530
committerTom Rini <trini@konsulko.com>2017-02-08 16:24:27 -0500
commit3064aa7009aa75299bad66fd6de3916174822bfb (patch)
tree838fccd491482a3cba6146ae3b470c3f8081751b
parent4985012b73f298e514dea0af46106a107348bce1 (diff)
downloadu-boot-3064aa7009aa75299bad66fd6de3916174822bfb.tar.gz
u-boot-3064aa7009aa75299bad66fd6de3916174822bfb.tar.xz
u-boot-3064aa7009aa75299bad66fd6de3916174822bfb.zip
regulator: palmas: Fix smps6 - smps9 indices
The array indices used currently are dispalaced by 1 for SMPS6 through SMPS10 in the respective places of voltage and ctrl arrays hence fix the same as to assign the right voltage and ctrl registers. Signed-off-by: Keerthy <j-keerthy@ti.com>
-rw-r--r--drivers/power/regulator/palmas_regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index cce7cd2fc2..399f7a5f55 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -356,7 +356,7 @@ static int palmas_smps_probe(struct udevice *dev)
case 8:
case 9:
case 10:
- idx = dev->driver_data - 4;
+ idx = dev->driver_data - 3;
uc_pdata->ctrl_reg = palmas_smps_ctrl[type][idx];
uc_pdata->volt_reg = palmas_smps_volt[type][idx];
break;