diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-02-10 16:01:48 -0500 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2014-03-06 11:41:22 -0500 |
commit | fd9fdb78a9bf85b94fb2190c82ff280c8f8375cc (patch) | |
tree | 49ad197ab19b401edbc4957b5ce2ed53af643b09 /include/media | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) |
[media] of: move graph helpers from drivers/media/v4l2-core to drivers/of
This patch moves the parsing helpers used to parse connected graphs
in the device tree, like the video interface bindings documented in
Documentation/devicetree/bindings/media/video-interfaces.txt, from
drivers/media/v4l2-core/v4l2-of.c into drivers/of/base.c.
This allows to reuse the same parser code from outside the V4L2
framework, most importantly from display drivers.
The functions v4l2_of_get_next_endpoint, v4l2_of_get_remote_port,
and v4l2_of_get_remote_port_parent are moved. They are renamed to
of_graph_get_next_endpoint, of_graph_get_remote_port, and
of_graph_get_remote_port_parent, respectively.
Since there are not that many current users yet, switch all of
them to the new functions right away.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-of.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/include/media/v4l2-of.h b/include/media/v4l2-of.h index 541cea4122e9..3a49735c56a0 100644 --- a/include/media/v4l2-of.h +++ b/include/media/v4l2-of.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/of_graph.h> | ||
20 | 21 | ||
21 | #include <media/v4l2-mediabus.h> | 22 | #include <media/v4l2-mediabus.h> |
22 | 23 | ||
@@ -72,11 +73,6 @@ struct v4l2_of_endpoint { | |||
72 | #ifdef CONFIG_OF | 73 | #ifdef CONFIG_OF |
73 | int v4l2_of_parse_endpoint(const struct device_node *node, | 74 | int v4l2_of_parse_endpoint(const struct device_node *node, |
74 | struct v4l2_of_endpoint *endpoint); | 75 | struct v4l2_of_endpoint *endpoint); |
75 | struct device_node *v4l2_of_get_next_endpoint(const struct device_node *parent, | ||
76 | struct device_node *previous); | ||
77 | struct device_node *v4l2_of_get_remote_port_parent( | ||
78 | const struct device_node *node); | ||
79 | struct device_node *v4l2_of_get_remote_port(const struct device_node *node); | ||
80 | #else /* CONFIG_OF */ | 76 | #else /* CONFIG_OF */ |
81 | 77 | ||
82 | static inline int v4l2_of_parse_endpoint(const struct device_node *node, | 78 | static inline int v4l2_of_parse_endpoint(const struct device_node *node, |
@@ -85,25 +81,6 @@ static inline int v4l2_of_parse_endpoint(const struct device_node *node, | |||
85 | return -ENOSYS; | 81 | return -ENOSYS; |
86 | } | 82 | } |
87 | 83 | ||
88 | static inline struct device_node *v4l2_of_get_next_endpoint( | ||
89 | const struct device_node *parent, | ||
90 | struct device_node *previous) | ||
91 | { | ||
92 | return NULL; | ||
93 | } | ||
94 | |||
95 | static inline struct device_node *v4l2_of_get_remote_port_parent( | ||
96 | const struct device_node *node) | ||
97 | { | ||
98 | return NULL; | ||
99 | } | ||
100 | |||
101 | static inline struct device_node *v4l2_of_get_remote_port( | ||
102 | const struct device_node *node) | ||
103 | { | ||
104 | return NULL; | ||
105 | } | ||
106 | |||
107 | #endif /* CONFIG_OF */ | 84 | #endif /* CONFIG_OF */ |
108 | 85 | ||
109 | #endif /* _V4L2_OF_H */ | 86 | #endif /* _V4L2_OF_H */ |