mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
ASoC: SDCA: Add default value for mipi-sdca-function-reset-max-delay
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: 7b6be935e7 ("ASoC: SDCA: Parse Function Reset max delay")
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260225140118.402695-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6de23f81a5
commit
1bbbda5b17
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -2167,8 +2167,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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user