diff options
author | Mark Brown <broonie@kernel.org> | 2021-05-12 18:22:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-05-12 18:22:53 +0300 |
commit | adf1471b2f7636362718cec42cf11599cced9733 (patch) | |
tree | ad45d40183212d4ee9cec175a32515f339c087ed /drivers/regulator | |
parent | 3d681804efcb6e5d8089a433402e19179347d7ae (diff) | |
parent | f8c8871f5eff3981eeb13421aca2c1cfda4a5204 (diff) | |
download | linux-adf1471b2f7636362718cec42cf11599cced9733.tar.xz |
Merge series "regulator: fan53555: tcs4525 fix and cleanup" from Peter Geis <pgwipeout@gmail.com>:
The tcs4525 voltage calculation is incorrect, which leads to a deadlock
on the rk3566-quartz64 board when loading cpufreq.
Fix the voltage calculation to correct the deadlock.
While we are at it, add a safety check and clean up the function names
to be more accurate.
Peter Geis (3):
regulator: fan53555: fix TCS4525 voltage calulation
regulator: fan53555: only bind tcs4525 to correct chip id
regulator: fan53555: fix tcs4525 function names
drivers/regulator/fan53555.c | 44 ++++++++++++++++++++++--------------
1 file changed, 27 insertions(+), 17 deletions(-)
--
2.25.1
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/fan53555.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index f3918f03aaf3..26f06f685b1b 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -55,7 +55,6 @@ #define FAN53555_NVOLTAGES 64 /* Numbers of voltages */ #define FAN53526_NVOLTAGES 128 -#define TCS4525_NVOLTAGES 127 /* Numbers of voltages */ #define TCS_VSEL_NSEL_MASK 0x7f #define TCS_VSEL0_MODE (1 << 7) @@ -376,7 +375,7 @@ static int fan53555_voltages_setup_tcs(struct fan53555_device_info *di) /* Init voltage range and step */ di->vsel_min = 600000; di->vsel_step = 6250; - di->vsel_count = TCS4525_NVOLTAGES; + di->vsel_count = FAN53526_NVOLTAGES; return 0; } |