aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-05-17 06:31:04 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 23:50:46 -0400
commitc9bca8b33118573da9b7ac2ea21947a8e4d287dd (patch)
treec31d34a89eb3ea5233f4f3494386ad130c0fa950 /include/media
parent2dca0551e4e2f3fc2b9beee784c7071e1e79c14b (diff)
[media] v4l: of: Add v4l2_of_parse_link() function
The function fills a link data structure with the device node and port number at both the local and remote ends of a link defined by one of its endpoint nodes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-of.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/media/v4l2-of.h b/include/media/v4l2-of.h
index 2de42c584eb2..f831c9c225b6 100644
--- a/include/media/v4l2-of.h
+++ b/include/media/v4l2-of.h
@@ -69,9 +69,26 @@ struct v4l2_of_endpoint {
69 struct list_head head; 69 struct list_head head;
70}; 70};
71 71
72/**
73 * struct v4l2_of_link - a link between two endpoints
74 * @local_node: pointer to device_node of this endpoint
75 * @local_port: identifier of the port this endpoint belongs to
76 * @remote_node: pointer to device_node of the remote endpoint
77 * @remote_port: identifier of the port the remote endpoint belongs to
78 */
79struct v4l2_of_link {
80 struct device_node *local_node;
81 unsigned int local_port;
82 struct device_node *remote_node;
83 unsigned int remote_port;
84};
85
72#ifdef CONFIG_OF 86#ifdef CONFIG_OF
73int v4l2_of_parse_endpoint(const struct device_node *node, 87int v4l2_of_parse_endpoint(const struct device_node *node,
74 struct v4l2_of_endpoint *endpoint); 88 struct v4l2_of_endpoint *endpoint);
89int v4l2_of_parse_link(const struct device_node *node,
90 struct v4l2_of_link *link);
91void v4l2_of_put_link(struct v4l2_of_link *link);
75#else /* CONFIG_OF */ 92#else /* CONFIG_OF */
76 93
77static inline int v4l2_of_parse_endpoint(const struct device_node *node, 94static inline int v4l2_of_parse_endpoint(const struct device_node *node,
@@ -80,6 +97,16 @@ static inline int v4l2_of_parse_endpoint(const struct device_node *node,
80 return -ENOSYS; 97 return -ENOSYS;
81} 98}
82 99
100static inline int v4l2_of_parse_link(const struct device_node *node,
101 struct v4l2_of_link *link)
102{
103 return -ENOSYS;
104}
105
106static inline void v4l2_of_put_link(struct v4l2_of_link *link)
107{
108}
109
83#endif /* CONFIG_OF */ 110#endif /* CONFIG_OF */
84 111
85#endif /* _V4L2_OF_H */ 112#endif /* _V4L2_OF_H */