]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg
authorAxel Lin <axel.lin@ingics.com>
Wed, 26 Jun 2019 13:26:31 +0000 (21:26 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 22 Jul 2019 12:17:54 +0000 (13:17 +0100)
commitd379e3941742e353dcd58e91f246dda88ea7c17a
tree840287e6895441f22b9aa3f67cbfd8728cb658b4
parent3946fc9291da929ed6836ab79a3b87c34d142954
regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg

According to the datasheet https://www.ti.com/lit/ds/symlink/lm3632a.pdf
Table 20. VPOS Bias Register Field Descriptions VPOS[5:0]
Sets the Positive Display Bias (LDO) Voltage (50 mV per step)
000000: 4 V
000001: 4.05 V
000010: 4.1 V
....................
011101: 5.45 V
011110: 5.5 V (Default)
011111: 5.55 V
....................
100111: 5.95 V
101000: 6 V
Note: Codes 101001 to 111111 map to 6 V

The LM3632_LDO_VSEL_MAX should be 0b101000 (0x28), so the maximum voltage
can match the datasheet.

Fixes: 319d510c8dd9 ("regulator: add LM363X driver")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20190626132632.32629-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/lm363x-regulator.c