Re: [PATCH 2/2] rcar-csi2: Set bus type when parsing fwnode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Niklas,

On Mon, Sep 14, 2020 at 11:50:11PM +0200, Niklas Söderlund wrote:
> The only supported bus for the R-Car CSI-2 driver is CSI-2 DPHY, specify
> this before parsing the fwnode.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> ---
>  drivers/media/platform/rcar-vin/rcar-csi2.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
> index 23e89ef2429d310a..b2e58f51b94fccd7 100644
> --- a/drivers/media/platform/rcar-vin/rcar-csi2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
> @@ -874,7 +874,9 @@ static int rcsi2_parse_dt(struct rcar_csi2 *priv)
>  	struct v4l2_async_subdev *asd;
>  	struct fwnode_handle *fwnode;
>  	struct fwnode_handle *ep;
> -	struct v4l2_fwnode_endpoint v4l2_ep = { .bus_type = 0 };
> +	struct v4l2_fwnode_endpoint v4l2_ep = {
> +		.bus_type = V4L2_MBUS_CSI2_DPHY
> +	};

I would also take the occasion to make bus-type mandatory in
bindings as v4l2_fwnode_endpoint_parse() will fail only if it detect a
mismatch between bus_type and "bus-type".

For older DTS we won't detect mismatches, but that's not worse than
what we have today.

In case you update bindings I would update the error message in the
v4l2_fwnode_endpoint_parse() failure path to report the mismatch.

The patch itself is good
Reviewed-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx>

Thanks
  j


>  	int ret;
>
>  	ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(priv->dev), 0, 0, 0);
> --
> 2.28.0
>



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux