From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE4E3C43218 for ; Tue, 11 Jun 2019 11:31:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC2BA2089E for ; Tue, 11 Jun 2019 11:31:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389616AbfFKLbP (ORCPT ); Tue, 11 Jun 2019 07:31:15 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50507 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389464AbfFKLbP (ORCPT ); Tue, 11 Jun 2019 07:31:15 -0400 X-Originating-IP: 90.88.159.246 Received: from localhost (aaubervilliers-681-1-40-246.w90-88.abo.wanadoo.fr [90.88.159.246]) (Authenticated sender: maxime.ripard@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B79F460007; Tue, 11 Jun 2019 11:31:08 +0000 (UTC) Date: Tue, 11 Jun 2019 13:31:08 +0200 From: Maxime Ripard To: Rob Herring Cc: Mark Rutland , Frank Rowand , "David S . Miller" , Chen-Yu Tsai , Maxime Coquelin , Alexandre Torgue , netdev , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Chevallier , Antoine =?utf-8?Q?T=C3=A9nart?= , Andrew Lunn , Florian Fainelli , Heiner Kallweit Subject: Re: [PATCH v2 09/11] dt-bindings: net: sun8i-emac: Convert the binding to a schemas Message-ID: <20190611113108.pxiia2u5skbnl2au@flea> References: <91618c7e9a5497462afa74c6d8a947f709f54331.1560158667.git-series.maxime.ripard@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="twpj3baugamuul24" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org --twpj3baugamuul24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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 --twpj3baugamuul24 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXP+Q/AAKCRDj7w1vZxhR xXNCAP9Z7+EYu847+4dOo5AEj3ZOyAIpaf0cfysGi59ElDt8YgEA36E6Jv7/cOpS KBTjh2j/vsuGvWij3L6KlfuKURO0UwM= =3dqX -----END PGP SIGNATURE----- --twpj3baugamuul24--