]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: fan53555: fix TCS4525 voltage calulation
authorPeter Geis <pgwipeout@gmail.com>
Tue, 11 May 2021 21:13:33 +0000 (17:13 -0400)
committerMark Brown <broonie@kernel.org>
Wed, 12 May 2021 15:26:39 +0000 (16:26 +0100)
commit5252233656f84ff17a0c8fdbb8b354e4e890c20d
tree1a195ff6b2ab7eb327d493a0b2eba694cb6b43f9
parentf7e8e3ca617cb9af0150c6321475986883a0ed57
regulator: fan53555: fix TCS4525 voltage calulation

The TCS4525 has 128 voltage steps. With the calculation set to 127 the
most significant bit is disregarded which leads to a miscalculation of
the voltage by about 200mv.

Fix the calculation to end deadlock on the rk3566-quartz64 which uses
this as the cpu regulator.

Fixes: 74ce83f26ff6 ("regulator: fan53555: Add TCS4525 DCDC support")
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20210511211335.2935163-2-pgwipeout@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/fan53555.c