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=-12.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 70FD4C2D0C1 for ; Thu, 19 Dec 2019 09:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47E8F24676 for ; Thu, 19 Dec 2019 09:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576746767; bh=ZbxHfG9y4vIMWKbc3+hFLIbewsQNOoX8QrADlrcLuWU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=GYpFGmt+lQ6POEIqGbOt+gvvZ4qkp6LQdj8aYpn+cLC01VNGY3BZlA+bgVXroXPzi AmGsGVpIVGEOUqhzGknisv+KEDVwVF36nNkG3g0dek+bDZ8LG3T4O9BuKtzYp5H8rM BQ+SsD1TlI4IQC0JzrevqQtV9CflhEmnFPw1SAxU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfLSJMq (ORCPT ); Thu, 19 Dec 2019 04:12:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:37064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbfLSJMq (ORCPT ); Thu, 19 Dec 2019 04:12:46 -0500 Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82AEC21D7D; Thu, 19 Dec 2019 09:12:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576746765; bh=ZbxHfG9y4vIMWKbc3+hFLIbewsQNOoX8QrADlrcLuWU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t2alWsEOvF8DCjRjimhRTAdpzJWLpz/GTNQyHJISxzvJfKdtGuDmaCglDwOgE1Lyf XOnOercEVcK2Pu111Fo+Q42qArfYxIvHSt3BQTYvn0p6XEfrpnsG1PhyUTwDbGlrXV kbtmCaSBCgmtTdaviJG/wPa3SO3LE2F5sTLB/YFc= Date: Thu, 19 Dec 2019 10:12:42 +0100 From: Maxime Ripard To: Vasily Khoruzhick Cc: Yangtao Li , Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Chen-Yu Tsai , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Linux PM , devicetree , arm-linux , =?utf-8?Q?Ond=C5=99ej?= Jirman , linux-kernel Subject: Re: [PATCH v7 2/7] dt-bindings: thermal: add YAML schema for sun8i-thermal driver bindings Message-ID: <20191219091242.a3etnhybf3sfrmf5@gilmour.lan> References: <20191218042121.1471954-1-anarsoul@gmail.com> <20191218042121.1471954-3-anarsoul@gmail.com> <20191218220037.4g6pzdvrhroaj4qu@gilmour.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fd7bvdcala2bzv3x" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fd7bvdcala2bzv3x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 18, 2019 at 02:27:00PM -0800, Vasily Khoruzhick wrote: > On Wed, Dec 18, 2019 at 2:00 PM Maxime Ripard wrote: > > On Tue, Dec 17, 2019 at 08:21:16PM -0800, Vasily Khoruzhick wrote: > > > From: Yangtao Li > > > > > > sun8i-thermal driver supports thermal sensor in wide range of Allwinner > > > SoCs. Add YAML schema for its bindings. > > > > > > Signed-off-by: Yangtao Li > > > Signed-off-by: Vasily Khoruzhick > > > --- > > > .../thermal/allwinner,sun8i-a83t-ths.yaml | 146 ++++++++++++++++++ > > > 1 file changed, 146 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > > new file mode 100644 > > > index 000000000000..8768c2450633 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > > @@ -0,0 +1,146 @@ > > > +# SPDX-License-Identifier: GPL-2.0 > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Allwinner SUN8I Thermal Controller Device Tree Bindings > > > + > > > +maintainers: > > > + - Yangtao Li > > > + > > > +properties: > > > + compatible: > > > + enum: > > > + - allwinner,sun8i-a83t-ths > > > + - allwinner,sun8i-h3-ths > > > + - allwinner,sun8i-r40-ths > > > + - allwinner,sun50i-a64-ths > > > + - allwinner,sun50i-h5-ths > > > + - allwinner,sun50i-h6-ths > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + interrupts: > > > + maxItems: 1 > > > + > > > + resets: > > > + maxItems: 1 > > > + > > > + nvmem-cells: > > > + maxItems: 1 > > > + description: Calibration data for thermal sensors > > > + > > > + nvmem-cell-names: > > > + const: calibration > > > + > > > +allOf: > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: allwinner,sun50i-h6-ths > > > + > > > + then: > > > + properties: > > > + clocks: > > > + minItems: 1 > > > + maxItems: 1 > > > > When minItems and maxItems are equal, you can only set one, the other > > will be filled automatically. > > Is it documented anywhere? I have a feeling like I'm shooting in the > dark. So far I've read Documentation/devicetree/writing-schema.rst, > Documentation/devicetree/bindings/example-schema.yaml and few other > schemas for inspiration but yet I don't have solid understanding how > it's supposed to be written. Examples are pretty scarce and figuring > out why certain construction doesn't work is pretty tricky. It's somewhat documented with https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/example-schema.yaml#n80 and https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/example-schema.yaml#n102 But I guess it wasn't clear enough? Feel free to update it to something that would be better Maxime --fd7bvdcala2bzv3x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXfs/CgAKCRDj7w1vZxhR xWnZAQDQjjz1zdDw2o0CKbXeWoqNzvCd9sNbulu3JkcPz9GjDAD/Z9Zm7vB9ZgYg ilf8Y1BHYMty/J1hDT69ZHP/Ayu9PgY= =KdAM -----END PGP SIGNATURE----- --fd7bvdcala2bzv3x--