[SRU][R][PATCH 1/7] ASoC: SDCA: Add default value for mipi-sdca-function-reset-max-delay
Chris Chiu
chris.chiu at canonical.com
Tue Mar 17 03:44:32 UTC 2026
From: Charles Keepax <ckeepax at opensource.cirrus.com>
BugLink: https://bugs.launchpad.net/bugs/2143902
Add a default value for the function reset timeout since version 1.0
of the SDCA specification doesn't actually include this property, it
was added later.
Fixes: 7b6be935e7ef ("ASoC: SDCA: Parse Function Reset max delay")
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.dev>
Signed-off-by: Charles Keepax <ckeepax at opensource.cirrus.com>
Link: https://patch.msgid.link/20260225140118.402695-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie at kernel.org>
(cherry picked from commit 1bbbda5b178a1399339139eb3c326300008b72d6)
Signed-off-by: Chris Chiu <chris.chiu at canonical.com>
---
sound/soc/sdca/sdca_fdl.c | 5 -----
sound/soc/sdca/sdca_functions.c | 6 +++++-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/sound/soc/sdca/sdca_fdl.c b/sound/soc/sdca/sdca_fdl.c
index 8bee9f23c473..af7208a8be7b 100644
--- a/sound/soc/sdca/sdca_fdl.c
+++ b/sound/soc/sdca/sdca_fdl.c
@@ -46,11 +46,6 @@ int sdca_reset_function(struct device *dev, struct sdca_function_data *function,
if (ret) // Allowed for function reset to not be implemented
return 0;
- if (!function->reset_max_delay) {
- dev_err(dev, "No reset delay specified in DisCo\n");
- return -EINVAL;
- }
-
/*
* Poll up to 16 times but no more than once per ms, these are just
* arbitrarily selected values, so may be fine tuned in future.
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index 4d144d0cd372..df076e7901b6 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -2132,8 +2132,12 @@ int sdca_parse_function(struct device *dev, struct sdw_slave *sdw,
ret = fwnode_property_read_u32(function_desc->node,
"mipi-sdca-function-reset-max-delay", &tmp);
- if (!ret)
+ if (ret || tmp == 0) {
+ dev_dbg(dev, "reset delay missing, defaulting to 100mS\n");
+ function->reset_max_delay = 100000;
+ } else {
function->reset_max_delay = tmp;
+ }
dev_dbg(dev, "%pfwP: name %s busy delay %dus reset delay %dus\n",
function->desc->node, function->desc->name,
--
2.43.0
More information about the kernel-team
mailing list