aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-02-10 16:01:48 -0500
committerPhilipp Zabel <p.zabel@pengutronix.de>2014-03-06 11:41:22 -0500
commitfd9fdb78a9bf85b94fb2190c82ff280c8f8375cc (patch)
tree49ad197ab19b401edbc4957b5ce2ed53af643b09 /drivers/media/platform/exynos4-is
parent0414855fdc4a40da05221fc6062cccbc0c30f169 (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 'drivers/media/platform/exynos4-is')
-rw-r--r--drivers/media/platform/exynos4-is/fimc-is.c6
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.c3
-rw-r--r--drivers/media/platform/exynos4-is/mipi-csis.c3
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 13a4228952e3..9bdfa4599bc3 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -24,13 +24,13 @@
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/of_address.h> 26#include <linux/of_address.h>
27#include <linux/of_graph.h>
27#include <linux/of_platform.h> 28#include <linux/of_platform.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/pm_runtime.h> 30#include <linux/pm_runtime.h>
30#include <linux/slab.h> 31#include <linux/slab.h>
31#include <linux/types.h> 32#include <linux/types.h>
32#include <linux/videodev2.h> 33#include <linux/videodev2.h>
33#include <media/v4l2-of.h>
34#include <media/videobuf2-dma-contig.h> 34#include <media/videobuf2-dma-contig.h>
35 35
36#include "media-dev.h" 36#include "media-dev.h"
@@ -167,10 +167,10 @@ static int fimc_is_parse_sensor_config(struct fimc_is_sensor *sensor,
167 u32 tmp = 0; 167 u32 tmp = 0;
168 int ret; 168 int ret;
169 169
170 np = v4l2_of_get_next_endpoint(np, NULL); 170 np = of_graph_get_next_endpoint(np, NULL);
171 if (!np) 171 if (!np)
172 return -ENXIO; 172 return -ENXIO;
173 np = v4l2_of_get_remote_port(np); 173 np = of_graph_get_remote_port(np);
174 if (!np) 174 if (!np)
175 return -ENXIO; 175 return -ENXIO;
176 176
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index c1bce170df6f..d0f82da59ac5 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -20,6 +20,7 @@
20#include <linux/of.h> 20#include <linux/of.h>
21#include <linux/of_platform.h> 21#include <linux/of_platform.h>
22#include <linux/of_device.h> 22#include <linux/of_device.h>
23#include <linux/of_graph.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/pm_runtime.h> 25#include <linux/pm_runtime.h>
25#include <linux/types.h> 26#include <linux/types.h>
@@ -473,7 +474,7 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
473 474
474 pd->mux_id = (endpoint.port - 1) & 0x1; 475 pd->mux_id = (endpoint.port - 1) & 0x1;
475 476
476 rem = v4l2_of_get_remote_port_parent(ep); 477 rem = of_graph_get_remote_port_parent(ep);
477 of_node_put(ep); 478 of_node_put(ep);
478 if (rem == NULL) { 479 if (rem == NULL) {
479 v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n", 480 v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index f3c3591fdc5d..fd1ae6549607 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -20,6 +20,7 @@
20#include <linux/memory.h> 20#include <linux/memory.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/of.h> 22#include <linux/of.h>
23#include <linux/of_graph.h>
23#include <linux/phy/phy.h> 24#include <linux/phy/phy.h>
24#include <linux/platform_data/mipi-csis.h> 25#include <linux/platform_data/mipi-csis.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
@@ -762,7 +763,7 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
762 &state->max_num_lanes)) 763 &state->max_num_lanes))
763 return -EINVAL; 764 return -EINVAL;
764 765
765 node = v4l2_of_get_next_endpoint(node, NULL); 766 node = of_graph_get_next_endpoint(node, NULL);
766 if (!node) { 767 if (!node) {
767 dev_err(&pdev->dev, "No port node at %s\n", 768 dev_err(&pdev->dev, "No port node at %s\n",
768 pdev->dev.of_node->full_name); 769 pdev->dev.of_node->full_name);