summaryrefslogtreecommitdiffstats
path: root/include/linux/of_graph.h
diff options
context:
space:
mode:
authorHyungwon Hwang <human.hwang@samsung.com>2015-06-12 21:59:01 +0900
committerInki Dae <inki.dae@samsung.com>2015-06-22 19:56:51 +0900
commit8ccd0d0ca04147e91890c373677f1e741dda2631 (patch)
tree7260e81214d10d2d083b537555627f5b6ac3dd29 /include/linux/of_graph.h
parentc8466a9166b00ecb0c6f768baf70636fe15f63ef (diff)
downloadlinux-8ccd0d0ca04147e91890c373677f1e741dda2631.tar.gz
linux-8ccd0d0ca04147e91890c373677f1e741dda2631.tar.bz2
linux-8ccd0d0ca04147e91890c373677f1e741dda2631.zip
of: add helper for getting endpoint node of specific identifiers
When there are multiple ports or multiple endpoints in a port, they have to be distinguished by the value of reg property. It is common. The drivers can get the specific endpoint in the specific port via this function. Now the drivers have to implement this code in themselves or have to force the order of dt nodes to get the right node. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Acked-by: Rob Herring <robh+dt@kernel.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'include/linux/of_graph.h')
-rw-r--r--include/linux/of_graph.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h
index 7bc92e050608..1c1d5b901a72 100644
--- a/include/linux/of_graph.h
+++ b/include/linux/of_graph.h
@@ -45,6 +45,8 @@ int of_graph_parse_endpoint(const struct device_node *node,
struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id);
struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
struct device_node *previous);
+struct device_node *of_graph_get_endpoint_by_regs(
+ const struct device_node *parent, int port_reg, int reg);
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);
@@ -69,6 +71,12 @@ static inline struct device_node *of_graph_get_next_endpoint(
return NULL;
}
+struct device_node *of_graph_get_endpoint_by_regs(
+ const struct device_node *parent, int port_reg, int reg)
+{
+ return NULL;
+}
+
static inline struct device_node *of_graph_get_remote_port_parent(
const struct device_node *node)
{