[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200804081801.GD13316@paasikivi.fi.intel.com>
Date: Tue, 4 Aug 2020 11:18:01 +0300
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc: Jacopo Mondi <jacopo@...ndi.org>,
Steve Longerbeam <slongerbeam@...il.com>,
Hugues Fruchet <hugues.fruchet@...com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Biju Das <biju.das.jz@...renesas.com>,
Prabhakar <prabhakar.csengg@...il.com>,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v2 4/4] media: i2c: ov5640: Fallback to parallel mode
Hi Prabhakar,
On Mon, Aug 03, 2020 at 03:31:47PM +0100, Lad Prabhakar wrote:
> 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@...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;
You basically need the type from the v4l2_fwnode_endpoint_parse(), and if
you don't have any of the above bus types, probe should fail. The old
bindings were documented in a way that either parallel or CSI-2 bus will be
used, and there were no defaults. So all should be well.
--
Sakari Ailus
Powered by blists - more mailing lists