diff options
author | Rob Herring <robh@kernel.org> | 2017-02-03 12:39:03 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-02-15 08:53:32 -0600 |
commit | b85ad494098bf881c3713218fbd74193e5d5c488 (patch) | |
tree | a57c1f3e5f422f3b4535f7069fe17b840a873722 /include/linux/of_graph.h | |
parent | bd0096d7467fbfa723cb1c12011098abf16de525 (diff) |
of: introduce of_graph_get_remote_node
The OF graph API leaves too much of the graph walking to clients when
in many cases the driver doesn't care about accessing the port or
endpoint nodes. The drivers typically just want the device connected via
a particular graph connection. of_graph_get_remote_node provides this
functionality.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'include/linux/of_graph.h')
-rw-r--r-- | include/linux/of_graph.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h index bb3a5a2cd570..abdb02eaef06 100644 --- a/include/linux/of_graph.h +++ b/include/linux/of_graph.h @@ -51,6 +51,8 @@ struct device_node *of_graph_get_endpoint_by_regs( struct device_node *of_graph_get_remote_port_parent( const struct device_node *node); struct device_node *of_graph_get_remote_port(const struct device_node *node); +struct device_node *of_graph_get_remote_node(const struct device_node *node, + u32 port, u32 endpoint); #else static inline int of_graph_parse_endpoint(const struct device_node *node, @@ -89,6 +91,12 @@ static inline struct device_node *of_graph_get_remote_port( { return NULL; } +static inline struct device_node *of_graph_get_remote_node( + const struct device_node *node, + u32 port, u32 endpoint) +{ + return NULL; +} #endif /* CONFIG_OF */ |