Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: cs42l42: Remove redundant delays in suspend().

This patch will remove redundant delay and minimise
total suspend() function call time.

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://msgid.link/r/20240216101157.23176-1-vitalyr@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Vitaly Rodionov and committed by
Mark Brown
3b4ec346 e480c099

+2 -4
+2 -3
include/sound/cs42l42.h
··· 809 809 #define CS42L42_PLL_LOCK_TIMEOUT_US 1250 810 810 #define CS42L42_HP_ADC_EN_TIME_US 20000 811 811 #define CS42L42_PDN_DONE_POLL_US 1000 812 - #define CS42L42_PDN_DONE_TIMEOUT_US 200000 813 - #define CS42L42_PDN_DONE_TIME_MS 100 814 - #define CS42L42_FILT_DISCHARGE_TIME_MS 46 812 + #define CS42L42_PDN_DONE_TIMEOUT_US 235000 813 + #define CS42L42_PDN_DONE_TIME_MS 65 815 814 816 815 #endif /* __CS42L42_H */
-1
sound/soc/codecs/cs42l42.c
··· 2195 2195 /* Discharge FILT+ */ 2196 2196 regmap_update_bits(cs42l42->regmap, CS42L42_PWR_CTL2, 2197 2197 CS42L42_DISCHARGE_FILT_MASK, CS42L42_DISCHARGE_FILT_MASK); 2198 - msleep(CS42L42_FILT_DISCHARGE_TIME_MS); 2199 2198 2200 2199 regcache_cache_only(cs42l42->regmap, true); 2201 2200 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);