ASoC: SDCA: Parse Function Reset max delay

Parse the DisCo property to get the timeout for a Function Reset.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20251020155512.353774-12-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Charles Keepax 2025-10-20 16:55:04 +01:00 committed by Mark Brown
parent 0a5e9769d0
commit 7b6be935e7
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 11 additions and 2 deletions

View File

@ -1323,6 +1323,8 @@ enum sdca_cluster_range {
* @num_clusters: Number of Channel Clusters reported in this Function.
* @busy_max_delay: Maximum Function busy delay in microseconds, before an
* error should be reported.
* @reset_max_delay: Maximum Function reset delay in microseconds, before an
* error should be reported.
*/
struct sdca_function_data {
struct sdca_function_desc *desc;
@ -1335,6 +1337,7 @@ struct sdca_function_data {
int num_clusters;
unsigned int busy_max_delay;
unsigned int reset_max_delay;
};
static inline u32 sdca_range(struct sdca_control_range *range,

View File

@ -2033,8 +2033,14 @@ int sdca_parse_function(struct device *dev, struct sdw_slave *sdw,
if (!ret)
function->busy_max_delay = tmp;
dev_info(dev, "%pfwP: name %s delay %dus\n", function->desc->node,
function->desc->name, function->busy_max_delay);
ret = fwnode_property_read_u32(function_desc->node,
"mipi-sdca-function-reset-max-delay", &tmp);
if (!ret)
function->reset_max_delay = tmp;
dev_info(dev, "%pfwP: name %s busy delay %dus reset delay %dus\n",
function->desc->node, function->desc->name,
function->busy_max_delay, function->reset_max_delay);
ret = find_sdca_init_table(dev, function_desc->node, function);
if (ret)