From 7ef8c9edc86cff0881b2eb9a3274796258fbd872 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 15 Jan 2021 14:16:50 +0800 Subject: ASoC: codecs: soundwire: increase resume timeout The resume operation relies on multiple transactions to synchronize the regmap state, make sure the timeout is one order of magnitude larger than an individual transaction, so that timeouts of failed transactions are detected first. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210115061651.9740-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/codecs/max98373-sdw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound/soc/codecs/max98373-sdw.c') diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index b8d471d79e93..d8c47667a9ea 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -262,6 +262,8 @@ static __maybe_unused int max98373_suspend(struct device *dev) return 0; } +#define MAX98373_PROBE_TIMEOUT 5000 + static __maybe_unused int max98373_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -275,7 +277,7 @@ static __maybe_unused int max98373_resume(struct device *dev) goto regmap_sync; time = wait_for_completion_timeout(&slave->initialization_complete, - msecs_to_jiffies(2000)); + msecs_to_jiffies(MAX98373_PROBE_TIMEOUT)); if (!time) { dev_err(dev, "Initialization not complete, timed out\n"); return -ETIMEDOUT; -- cgit v1.2.3