Messages in this thread Patch in this message | | | From | Lad Prabhakar <> | Subject | [PATCH v2 4/4] media: i2c: ov5640: Fallback to parallel mode | Date | Mon, 3 Aug 2020 15:31:47 +0100 |
| |
Fallback to parallel mode if bus_type doesn't match the supported interfaces by the driver.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> --- drivers/media/i2c/ov5640.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 08c67250042f..4e88b0540740 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -3074,6 +3074,12 @@ static int ov5640_probe(struct i2c_client *client) return ret; } + /* fallback to parallel mode */ + if (sensor->ep.bus_type != V4L2_MBUS_PARALLEL && + sensor->ep.bus_type != V4L2_MBUS_CSI2_DPHY && + sensor->ep.bus_type != V4L2_MBUS_BT656) + sensor->ep.bus_type = V4L2_MBUS_PARALLEL; + /* get system clock (xclk) */ sensor->xclk = devm_clk_get(dev, "xclk"); if (IS_ERR(sensor->xclk)) { -- 2.17.1
| |