diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2022-04-22 15:23:45 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-26 13:47:12 +0200 |
commit | 7a20917d30fb627bebff6bacbe860ad4eb3a04d6 (patch) | |
tree | 8e03a418f9834e473b97331de1f1d1be681563b2 /include/linux/property.h | |
parent | 3c162511530c234f95091bdc7225f641e5f35090 (diff) |
device property: Add helper to match multiple connections
In some cases multiple connections with the same connection id
needs to be resolved from a fwnode graph.
One such example is when separate hardware is used for performing muxing
and/or orientation switching of the SuperSpeed and SBU lines in a USB
Type-C connector. In this case the connector needs to belong to a graph
with multiple matching remote endpoints, and the Type-C controller needs
to be able to resolve them both.
Add a new API that allows this kind of lookup.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220422222351.1297276-2-bjorn.andersson@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/property.h')
-rw-r--r-- | include/linux/property.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/property.h b/include/linux/property.h index 4cd4b326941f..de7ff336d2c8 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -447,6 +447,11 @@ static inline void *device_connection_find_match(struct device *dev, return fwnode_connection_find_match(dev_fwnode(dev), con_id, data, match); } +int fwnode_connection_find_matches(struct fwnode_handle *fwnode, + const char *con_id, void *data, + devcon_match_fn_t match, + void **matches, unsigned int matches_len); + /* -------------------------------------------------------------------------- */ /* Software fwnode support - when HW description is incomplete or missing */ |