Re: [PATCH] dt-bindings: media: Use OF graph schema

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

 



On Tue, Nov 17, 2020 at 3:52 AM Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
>
> Hi Rob,
>
> Thank you for the patch.
>
> On Mon, Nov 16, 2020 at 07:39:47PM -0600, Rob Herring wrote:
> > Now that we have a graph schema, rework the media related schemas to
> > use it. Mostly this is adding a reference to graph.yaml and dropping
> > duplicate parts from schemas.
> >
> > Cc: Maxime Ripard <mripard@xxxxxxxxxx>
> > Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> > Cc: Jacopo Mondi <jacopo@xxxxxxxxxx>
> > Cc: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> > Cc: linux-media@xxxxxxxxxxxxxxx
> > Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> > ---
> > This can go via the media tree. Ideally anything else subsequently added
> > will be fixed up too.
> >
> >  .../media/allwinner,sun4i-a10-csi.yaml        |  1 +
> >  .../media/allwinner,sun6i-a31-csi.yaml        |  1 +
> >  .../bindings/media/i2c/adv7180.yaml           | 31 ++------
> >  .../bindings/media/i2c/adv7604.yaml           | 32 ++------
> >  .../bindings/media/i2c/aptina,mt9v111.yaml    |  2 +-
> >  .../bindings/media/i2c/imi,rdacm2x-gmsl.yaml  | 25 +-----
> >  .../devicetree/bindings/media/i2c/imx219.yaml |  4 +
> >  .../bindings/media/i2c/maxim,max9286.yaml     | 76 ++++---------------
> >  .../devicetree/bindings/media/i2c/ov5647.yaml |  5 +-
> >  .../devicetree/bindings/media/i2c/ov8856.yaml |  5 +-
> >  .../bindings/media/i2c/ovti,ov772x.yaml       |  1 +
> >  .../bindings/media/i2c/sony,imx214.yaml       |  1 +
> >  .../bindings/media/i2c/sony,imx274.yaml       |  3 +-
> >  .../bindings/media/marvell,mmp2-ccic.yaml     |  1 +
> >  .../bindings/media/renesas,ceu.yaml           |  1 +
> >  .../bindings/media/renesas,csi2.yaml          | 36 ++-------
> >  .../bindings/media/renesas,vin.yaml           |  7 +-
> >  .../bindings/media/st,stm32-dcmi.yaml         |  7 +-
> >  .../devicetree/bindings/media/ti,cal.yaml     | 15 +---
> >  .../bindings/media/xilinx/xlnx,csi2rxss.yaml  | 21 +----
> >  20 files changed, 61 insertions(+), 214 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
> > index 09318830db47..0205f7dd7fdb 100644
> > --- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
> > +++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
> > @@ -70,6 +70,7 @@ properties:
> >    # See ./video-interfaces.txt for details
> >    port:
> >      type: object
>
> Could the type be dropped (here and below, I haven't mentioned it in all
> locations) as it's specified in /schemas/graph.yaml#/properties/port ?

See my reply on the display patch for this.

> > +    $ref: /schemas/graph.yaml#/properties/port
> >      additionalProperties: false
>
> Don't we need to switch to unevaluatedProperties ?

We could, but additionalProperties works here because 'endpoint' is
the only one.


> > @@ -74,6 +76,8 @@ properties:
> >          required:
> >            - link-frequencies
> >
> > +    additionalProperties: false
>
> I supppose additionalProperties works here as the endpoint property is
> specified in this schema, but conceptually speaking, wouldn't
> unevaluatedProperties be a better match ?

Yes, except unevaluatedProperties is currently a nop, so I went the
stricter route.

Rob



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux