Skip to content

Commit e03826d

Browse files
Keerthyjbroonie
authored andcommitted
regulator: palmas: Correct TPS659038 register definition for REGEN2
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
1 parent c517d83 commit e03826d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/regulator/palmas-regulator.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,10 @@ static int palmas_regulators_probe(struct platform_device *pdev)
15721572
if (!pmic)
15731573
return -ENOMEM;
15741574

1575+
if (of_device_is_compatible(node, "ti,tps659038-pmic"))
1576+
palmas_generic_regs_info[PALMAS_REG_REGEN2].ctrl_addr =
1577+
TPS659038_REGEN2_CTRL;
1578+
15751579
pmic->dev = &pdev->dev;
15761580
pmic->palmas = palmas;
15771581
palmas->pmic = pmic;

include/linux/mfd/palmas.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,6 +2999,9 @@ enum usb_irq_events {
29992999
#define PALMAS_GPADC_TRIM15 0x0E
30003000
#define PALMAS_GPADC_TRIM16 0x0F
30013001

3002+
/* TPS659038 regen2_ctrl offset iss different from palmas */
3003+
#define TPS659038_REGEN2_CTRL 0x12
3004+
30023005
/* TPS65917 Interrupt registers */
30033006

30043007
/* Registers for function INTERRUPT */

0 commit comments

Comments
 (0)