ASoC: SDCA: export sdca_find_entity_by_label() helper

Export the sdca_find_entity_by_label() helper so that codec drivers can
locate SDCA entities by their labels.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260729032227.3750770-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shuming Fan 2026-07-29 11:22:27 +08:00 committed by Mark Brown
parent df3bdb5533
commit c24f4797d8
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 6 additions and 3 deletions

View File

@ -1469,5 +1469,7 @@ struct sdca_control_range *sdca_selector_find_range(struct device *dev,
struct sdca_cluster *sdca_id_find_cluster(struct device *dev,
struct sdca_function_data *function,
const int id);
struct sdca_entity *sdca_find_entity_by_label(struct sdca_function_data *function,
const char *entity_label);
#endif

View File

@ -1617,7 +1617,7 @@ static int find_sdca_entities(struct device *dev, struct sdw_slave *sdw,
return 0;
}
static struct sdca_entity *find_sdca_entity_by_label(struct sdca_function_data *function,
struct sdca_entity *sdca_find_entity_by_label(struct sdca_function_data *function,
const char *entity_label)
{
struct sdca_entity *entity = NULL;
@ -1646,6 +1646,7 @@ static struct sdca_entity *find_sdca_entity_by_label(struct sdca_function_data *
return NULL;
}
EXPORT_SYMBOL_NS(sdca_find_entity_by_label, "SND_SOC_SDCA");
static struct sdca_entity *find_sdca_entity_by_id(struct sdca_function_data *function,
const int id)
@ -1686,7 +1687,7 @@ static int find_sdca_entity_connection_iot(struct device *dev,
return ret;
}
clock_entity = find_sdca_entity_by_label(function, clock_label);
clock_entity = sdca_find_entity_by_label(function, clock_label);
if (!clock_entity) {
dev_err(dev, "%s: failed to find clock with label %s\n",
entity->label, clock_label);
@ -1871,7 +1872,7 @@ static int find_sdca_entity_connection(struct device *dev,
return ret;
}
connected_entity = find_sdca_entity_by_label(function, connected_label);
connected_entity = sdca_find_entity_by_label(function, connected_label);
if (!connected_entity) {
dev_err(dev, "%s: failed to find entity with label %s\n",
entity->label, connected_label);