summaryrefslogtreecommitdiff
path: root/include/linux/property.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2020-09-07 15:05:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-08 13:32:06 +0200
commitd7cf5590393132993f2e6d2618fd23a20a6342ca (patch)
treeb7f4b2afd93bb477a3b84e1e3bdf7558fb9a9895 /include/linux/property.h
parent28d9fdf04573cfed6a205220fb038dd444568fa3 (diff)
device property: Move fwnode_connection_find_match() under drivers/base/property.c
The function is now only a helper that searches the connection from device graph and then by checking if the supplied connection identifier matches a property that contains reference. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200907120532.37611-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/property.h')
-rw-r--r--include/linux/property.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/property.h b/include/linux/property.h
index 9f805c442819..aedae94dcf41 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -418,6 +418,20 @@ fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
struct fwnode_endpoint *endpoint);
+typedef void *(*devcon_match_fn_t)(struct fwnode_handle *fwnode, const char *id,
+ void *data);
+
+void *fwnode_connection_find_match(struct fwnode_handle *fwnode,
+ const char *con_id, void *data,
+ devcon_match_fn_t match);
+
+static inline void *device_connection_find_match(struct device *dev,
+ const char *con_id, void *data,
+ devcon_match_fn_t match)
+{
+ return fwnode_connection_find_match(dev_fwnode(dev), con_id, data, match);
+}
+
/* -------------------------------------------------------------------------- */
/* Software fwnode support - when HW description is incomplete or missing */