lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190611113108.pxiia2u5skbnl2au@flea>
Date:   Tue, 11 Jun 2019 13:31:08 +0200
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Rob Herring <robh+dt@...nel.org>
Cc:     Mark Rutland <mark.rutland@....com>,
        Frank Rowand <frowand.list@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Chen-Yu Tsai <wens@...e.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        netdev <netdev@...r.kernel.org>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>, devicetree@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        Maxime Chevallier <maxime.chevallier@...tlin.com>,
        Antoine Ténart <antoine.tenart@...tlin.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH v2 09/11] dt-bindings: net: sun8i-emac: Convert the
 binding to a schemas

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@...tlin.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

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ