diff options
author | Mark Brown <broonie@kernel.org> | 2021-05-12 17:22:53 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-05-12 17:22:53 +0200 |
commit | adf1471b2f7636362718cec42cf11599cced9733 (patch) | |
tree | ad45d40183212d4ee9cec175a32515f339c087ed /drivers | |
parent | regulator: cros-ec: Fix error code in dev_err message (diff) | |
parent | regulator: fan53555: fix TCS4525 voltage calulation (diff) | |
download | linux-adf1471b2f7636362718cec42cf11599cced9733.tar.xz linux-adf1471b2f7636362718cec42cf11599cced9733.zip |
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')
-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; } |