summaryrefslogtreecommitdiff
path: root/include/linux/property.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2022-04-23 01:23:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-26 14:47:12 +0300
commit7a20917d30fb627bebff6bacbe860ad4eb3a04d6 (patch)
tree8e03a418f9834e473b97331de1f1d1be681563b2 /include/linux/property.h
parent3c162511530c234f95091bdc7225f641e5f35090 (diff)
downloadlinux-7a20917d30fb627bebff6bacbe860ad4eb3a04d6.tar.xz
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.h5
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 */