Skip to contentSkip to conversation

regulator: palmas: Fix smps6 - smps9 indices

PATCH New Keerthy 2 participants 2 messages Feb 3, 2017 – Feb 9, 2017

lore
Share & tools
lore

Keerthy

author
#0 lore raw

PATCH v2 1/1 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.

---

Changes in v2:

* Elaborated the commit log.

 drivers/power/regulator/palmas_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/palmas_regulator.c +1 -1
index cce7cd2..399f7a5 100644
@@ -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;
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 regulator: palmas: Fix smps6 - smps9 indices

Quoted 6 lines · Keerthy

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170208/6ab21b3c/attachment.sig>