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
This commit is contained in:
Mark Brown 2021-05-12 16:22:53 +01:00
commit adf1471b2f
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;
}