summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-04-02 15:00:06 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2015-04-02 16:23:32 +0200
commit09d5f1a3ad615b96d9f01bca0622d41f20c3011b (patch)
tree4f1cb3a742d821826841455e38aa76e673d1fd51
parent037076aa223efe50c6e00b089c651375a047c6d3 (diff)
mxc_v4l2_capture: let the camera driver set mipi/parallel
The camera driver knows if it uses mipi or parallel, and in case a camera can do both it makes sense that this is in the device tree node for the camera and not the generic mxc_v4l2_capture.
-rw-r--r--drivers/media/platform/mxc/capture/mxc_v4l2_capture.c7
-rw-r--r--drivers/media/platform/mxc/capture/mxc_v4l2_capture.h1
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
index 670a5b28146b..3c8d105dea5a 100644
--- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
@@ -2718,7 +2718,7 @@ static int init_camera_struct(cam_data *cam, struct platform_device *pdev)
const struct of_device_id *of_id =
of_match_device(mxc_v4l2_dt_ids, &pdev->dev);
struct device_node *np = pdev->dev.of_node;
- int ipu_id, csi_id, mclk_source, mipi_camera;
+ int ipu_id, csi_id, mclk_source;
int ret = 0;
static int camera_id;
@@ -2742,10 +2742,6 @@ static int init_camera_struct(cam_data *cam, struct platform_device *pdev)
return ret;
}
- ret = of_property_read_u32(np, "mipi_camera", &mipi_camera);
- if (ret)
- mipi_camera = 0;
-
/* Default everything to 0 */
memset(cam, 0, sizeof(cam_data));
@@ -2820,7 +2816,6 @@ static int init_camera_struct(cam_data *cam, struct platform_device *pdev)
cam->ipu_id = ipu_id;
cam->csi = csi_id;
- cam->mipi_camera = mipi_camera;
cam->mclk_source = mclk_source;
cam->mclk_on[cam->mclk_source] = false;
diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h
index f2d294880914..e48d9cc967d2 100644
--- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h
+++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h
@@ -262,6 +262,7 @@ struct sensor_data {
struct clk *sensor_clk;
int ipu_id;
int csi;
+ int mipi_camera; /* 0: parallel camera hw if, != 0: mipi csi hw if */
void (*io_init)(void);
};