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 Jacopo,

On Tue, Sep 15, 2020 at 01:27:52PM +0200, Jacopo Mondi wrote:
> 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".

You don't really need bus-type property if the hardware supports a single
type. Then you can, as above, parse the endpoint with that type set by the
caller.

-- 
Sakari Ailus



[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