power: regulator: tps65941: Fix voltage calculation for ldo
authorUdit Kumar <u-kumar1@ti.com>
Tue, 11 Feb 2025 17:51:58 +0000 (23:21 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 18 Feb 2025 16:49:36 +0000 (10:49 -0600)
commite93f11148ae42bbb805077a48ab8cb63137a3a17
tree96ddb3a3ec1499cb7cd35d99a194803a2c8970b7
parent92880a58cafc93c0907b9d3a6b13e6425366b7c0
power: regulator: tps65941: Fix voltage calculation for ldo

As per TRM[0] Section 8.7.1 "TPS6594-Q1 Registers", LDOx_Vout
bit 6-1, define the NVM voltage settings.
Along side table 8-4 of above TRM, shows voltage to value mapping.

Driver wrongly using bits 5-1 to calculate voltage, and to convert
voltage to value driver was using buck's calculation.
So fix those calculation.

[0]: https://www.ti.com/lit/ds/symlink/tps6594-q1.pdf

Fixes: 5d7dbd22cf7d ("power: regulator: tps65941: use function callbacks for conversion ops")
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
drivers/power/regulator/tps65941_regulator.c
include/power/tps65941.h