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

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

 



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@xxxxxxxxxxxx>
> > > +  - Boris Brezillon <bbrezillon@xxxxxxxxxx>
> > > +
> > > +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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux