[PATCH v1 1/4] dt-bindings: display: convert atmel-hlcdc to DT Schema

Maxime Ripard maxime at cerno.tech
Thu Apr 16 07:28:20 UTC 2020


On Wed, Apr 15, 2020 at 06:39:56PM +0200, Sam Ravnborg wrote:
> Hi Maxime.
>
> On Tue, Apr 14, 2020 at 10:28:03AM +0200, Maxime Ripard wrote:
> > Hi Sam,
> >
> > On Sun, Apr 12, 2020 at 08:20:09PM +0200, Sam Ravnborg wrote:
> > > diff --git a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml
> > > new file mode 100644
> > > index 000000000000..7eb6266a25a2
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml
> > > @@ -0,0 +1,102 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/display/atmel/hlcdc-dc.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Atmel HLCDC (High LCD Controller) display controller
> > > +
> > > +maintainers:
> > > +  - Sam Ravnborg <sam at ravnborg.org>
> > > +  - Boris Brezillon <bbrezillon at kernel.org>
> > > +
> > > +description: |
> > > +  The Atmel HLCDC Display Controller is subdevice of the HLCDC MFD device.
> > > +  See ../../mfd/atmel-hlcdc.yaml for more details.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: atmel,hlcdc-display-controller
> > > +
> > > +  "#address-cells":
> > > +    const: 1
> > > +  "#size-cells":
> > > +    const: 0
> > > +
> > > +required:
> > > +  - compatible
> > > +  - "#address-cells"
> > > +  - "#size-cells"
> > > +
> > > +patternProperties:
> > > +  "^port@[0-9]$":
> > > +    type: object
> > > +    description: |
> > > +      A port node with endpoint definitions as defined in
> > > +      ../../media/video-interfaces.txt
> > > +
> > > +    properties:
> > > +      "#address-cells":
> > > +        const: 1
> > > +
> > > +      "#size-cells":
> > > +        const: 0
> > > +
> > > +      reg:
> > > +        maxItems: 1
> > > +        description: The virtual number of the port
> > > +
> > > +    patternProperties:
> > > +      "^endpoint(@[0-9])$":
> >
> > I guess you meant ^endpoint(@[0-9])?$ instead?
>
> I think "^endpoint@[0-9]$" will do the trick.
> No need for endpoints with numbers higher than 9.

If you want to stick to pedantic DT, then if there's a single
endpoint, you should avoid reg and the unit-address, and this is
something that dtc will complain about (even though it's silenced in
Linux), so yeah, ? seems the way to go.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200416/94238f7f/attachment-0001.sig>


More information about the dri-devel mailing list