Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1697104ybl; Thu, 19 Dec 2019 01:14:55 -0800 (PST) X-Google-Smtp-Source: APXvYqwSlxvQcykKdzXZQ399zOn01sOBt2d4ptOpDMzv0Z4pl9yk65BslhZbInPxm7LAEbELHlqe X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr6007221otc.123.1576746895569; Thu, 19 Dec 2019 01:14:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576746895; cv=none; d=google.com; s=arc-20160816; b=HkRgE5Cnql1gvDmC0QlzLsklK9zT4ND4cFoMULyjZlPZbg162uOccav26lwR4Zq4rg 0WaV1p8meshd/BohDGa85rZya9QXRfNP2Y/y24GcXY0wuvnrW7nNzDBgPgIgRRXBCqcB caQLBidsO4luBMtrC+/nmKHsFRslMak0pLTkc5XkSOsUPNKptr8WlnDOZCZDpqx6hS/O sZVahQyvfSod1HchH78dCIfJZndHthAVuZBMlGihRrBhdJe+SdHvt8wn6AX2L7QyAFD2 jTqWVW4knZDYnjpb6T11rXhL2Nq29uvlndtU61c6JBnMMOVPFHhsJiburq8gqF701YrM f1aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lilA30zCvKMjKVKT4YPWUES80S9NCp5PrWq5AZVYGE8=; b=FPoupM/+AbPplAT6SOfpx5WFr4dXTcRj5W9NhPieK3x/3oo1vvUyZK1swzP2JXDfGR hDONSjzw0HC/CUCb+BSq1MJIoI+iFz9axpaN6BsE2PA/nso30AiZPPOYeMfiv4Vyw6X3 LnaFCzG/45wCPEDtiKfl9btG1gVq+WcDjRDSTh8TV5zpg61isrreDgQYQdiSPkh6cfo8 FZf2hdKc5fGRMIT13rO1yliV2aJKlNfuc+Cdw56hqRmSIHpoUg1htB9wcGW02sl5PZh6 f33vM+JNy1nNcMiqyWvPGMMVeb7VWTEJ28/XBccKbYGzfVnTJIbiXFvZ8RycbjtMg/jf zvhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t2alWsEO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si2988357oto.204.2019.12.19.01.14.42; Thu, 19 Dec 2019 01:14:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t2alWsEO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbfLSJMq (ORCPT + 99 others); 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--