]> git.hungrycats.org Git - linux/commitdiff
regulator: palmas: Correct TPS659038 register definition for REGEN2
authorKeerthy <j-keerthy@ti.com>
Tue, 17 Mar 2015 10:26:04 +0000 (15:56 +0530)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 17 Apr 2015 00:13:16 +0000 (20:13 -0400)
[ Upstream commit e03826d5045e81a66a4fad7be9a8ecdaeb7911cf ]

The register offset for REGEN2_CTRL in different for TPS659038 chip as when
compared with other Palmas family PMICs. In the case of TPS659038 the wrong
offset pointed to PLLEN_CTRL and was causing a hang. Correcting the same.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/regulator/palmas-regulator.c
include/linux/mfd/palmas.h

index 1878e5b567efc6b98662670ab183e99d9c5c1e38..1a7f5fc116235a969695394373f420a6464f2dc6 100644 (file)
@@ -1572,6 +1572,10 @@ static int palmas_regulators_probe(struct platform_device *pdev)
        if (!pmic)
                return -ENOMEM;
 
+       if (of_device_is_compatible(node, "ti,tps659038-pmic"))
+               palmas_generic_regs_info[PALMAS_REG_REGEN2].ctrl_addr =
+                                                       TPS659038_REGEN2_CTRL;
+
        pmic->dev = &pdev->dev;
        pmic->palmas = palmas;
        palmas->pmic = pmic;
index fb0390a1a498f29df135bbe7500c1dfcc00a27d7..ee7b1ce7a6f8f42280abcc3d1411f7bcdebb6ac2 100644 (file)
@@ -2999,6 +2999,9 @@ enum usb_irq_events {
 #define PALMAS_GPADC_TRIM15                                    0x0E
 #define PALMAS_GPADC_TRIM16                                    0x0F
 
+/* TPS659038 regen2_ctrl offset iss different from palmas */
+#define TPS659038_REGEN2_CTRL                                  0x12
+
 /* TPS65917 Interrupt registers */
 
 /* Registers for function INTERRUPT */