aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-of.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-of.h')
-rw-r--r--include/media/v4l2-of.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/media/v4l2-of.h b/include/media/v4l2-of.h
index f831c9c225b6..4dc34b245d47 100644
--- a/include/media/v4l2-of.h
+++ b/include/media/v4l2-of.h
@@ -57,16 +57,19 @@ struct v4l2_of_bus_parallel {
57 * @base: struct of_endpoint containing port, id, and local of_node 57 * @base: struct of_endpoint containing port, id, and local of_node
58 * @bus_type: bus type 58 * @bus_type: bus type
59 * @bus: bus configuration data structure 59 * @bus: bus configuration data structure
60 * @head: list head for this structure 60 * @link_frequencies: array of supported link frequencies
61 * @nr_of_link_frequencies: number of elements in link_frequenccies array
61 */ 62 */
62struct v4l2_of_endpoint { 63struct v4l2_of_endpoint {
63 struct of_endpoint base; 64 struct of_endpoint base;
65 /* Fields below this line will be zeroed by v4l2_of_parse_endpoint() */
64 enum v4l2_mbus_type bus_type; 66 enum v4l2_mbus_type bus_type;
65 union { 67 union {
66 struct v4l2_of_bus_parallel parallel; 68 struct v4l2_of_bus_parallel parallel;
67 struct v4l2_of_bus_mipi_csi2 mipi_csi2; 69 struct v4l2_of_bus_mipi_csi2 mipi_csi2;
68 } bus; 70 } bus;
69 struct list_head head; 71 u64 *link_frequencies;
72 unsigned int nr_of_link_frequencies;
70}; 73};
71 74
72/** 75/**
@@ -86,6 +89,9 @@ struct v4l2_of_link {
86#ifdef CONFIG_OF 89#ifdef CONFIG_OF
87int v4l2_of_parse_endpoint(const struct device_node *node, 90int v4l2_of_parse_endpoint(const struct device_node *node,
88 struct v4l2_of_endpoint *endpoint); 91 struct v4l2_of_endpoint *endpoint);
92struct v4l2_of_endpoint *v4l2_of_alloc_parse_endpoint(
93 const struct device_node *node);
94void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint);
89int v4l2_of_parse_link(const struct device_node *node, 95int v4l2_of_parse_link(const struct device_node *node,
90 struct v4l2_of_link *link); 96 struct v4l2_of_link *link);
91void v4l2_of_put_link(struct v4l2_of_link *link); 97void v4l2_of_put_link(struct v4l2_of_link *link);
@@ -97,6 +103,16 @@ static inline int v4l2_of_parse_endpoint(const struct device_node *node,
97 return -ENOSYS; 103 return -ENOSYS;
98} 104}
99 105
106static inline struct v4l2_of_endpoint *v4l2_of_alloc_parse_endpoint(
107 const struct device_node *node)
108{
109 return NULL;
110}
111
112static inline void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint)
113{
114}
115
100static inline int v4l2_of_parse_link(const struct device_node *node, 116static inline int v4l2_of_parse_link(const struct device_node *node,
101 struct v4l2_of_link *link) 117 struct v4l2_of_link *link)
102{ 118{