[Linux-stm32] [PATCH v2 09/11] dt-bindings: net: sun8i-emac: Convert the binding to a schemas

Maxime Ripard maxime.ripard at bootlin.com
Tue Jun 11 11:31:08 UTC 2019


Hi,

On Mon, Jun 10, 2019 at 01:22:00PM -0600, Rob Herring wrote:
> On Mon, Jun 10, 2019 at 3:26 AM Maxime Ripard <maxime.ripard at bootlin.com> wrote:
> > +    then:
> > +      properties:
> > +        allwinner,tx-delay-ps:
> > +          allOf:
> > +            - $ref: /schemas/types.yaml#definitions/uint32
>
> Can drop this as anything with unit prefix has its type defined
> already.

Not for picoseconds though. I'll send a PR to dt-schema if you prefer
to define it there.

>
> > +            - enum: [0, 100, 200, 300, 400, 500, 600, 700]
> > +              default: 0
> > +          description:
> > +            External RGMII PHY TX clock delay chain value in ps.
> > +
> > +        allwinner,rx-delay-ps:
> > +          allOf:
> > +            - $ref: /schemas/types.yaml#definitions/uint32
> > +            - enum:
> > +                - 0
> > +                - 100
> > +                - 200
> > +                - 300
> > +                - 400
> > +                - 500
> > +                - 600
> > +                - 700
> > +                - 800
> > +                - 900
> > +                - 1000
> > +                - 1100
> > +                - 1200
> > +                - 1300
> > +                - 1400
> > +                - 1500
> > +                - 1600
> > +                - 1700
> > +                - 1800
> > +                - 1900
> > +                - 2000
> > +                - 2100
> > +                - 2200
> > +                - 2300
> > +                - 2400
> > +                - 2500
> > +                - 2600
> > +                - 2700
> > +                - 2800
> > +                - 2900
> > +                - 3000
> > +                - 3100
>
> I think you can do
>
> enum: [1, 2, 3,
>   4,  5, 6]
>
> Or you can do:
>
> minimum: 0
> maximum: 3100
> multipleOf: 100
>
> IIRC that multipleOf is a json-schema key.

I really like that second syntax, thanks!

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://st-md-mailman.stormreply.com/pipermail/linux-stm32/attachments/20190611/41c24aee/attachment.sig>


More information about the Linux-stm32 mailing list