Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2172267ybd; Mon, 24 Jun 2019 01:56:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQda20OMUxaRH+49Pm8JvUYEuvuyu+NjNhfRg+h8C+2hv5WQaU92jnw6z4MK3Cl482/apA X-Received: by 2002:a17:902:2a69:: with SMTP id i96mr137486114plb.108.1561366605360; Mon, 24 Jun 2019 01:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561366605; cv=none; d=google.com; s=arc-20160816; b=BAQMVIEevJGe3X8C0bB4xdo7qfLQfgAZEDvMH0SLa+kNavZgyEbJNOWkuccN/q4JFv cOW3lbuf66yVdhH04zD/dVT9Xwlkd44nb4JGHigzA1li9JFpDSCDo5u4NZM+sfkAsgHG YQd3N8+bK0h3zYc5ZCJRoSPFc70dTBXMt8InLlDrf4BL+Mno1uHfBuQ7bCoAtzBBr3cy bz9bqTzUis4bIZv9sdekCYMvrWhmX0d16DjBgUfhRkBlz+NGFEQ27sELPLj4BQIDjSgX /rR3OKBJKAwgHm8oXGL70snqp1vCCkD2i25EhWa88j0PIA0LJ2gq8qkBieHikYLdPFi8 PLBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cfki447Lp7DBigHaK/y7LKtgqZKsirQ4+3DSnS4h1R4=; b=h6+vMFvKSqizBIpRdOYd8ymlLiRGyqYkOyFWKNBuW3mQCg8ab6tPVQV6GUiZzCrjsi TPM5VUswceDzW49KKU0JZoQY9CLvDRg9h5jNbPcskQFgQ5xFey3UKzj9/hcK79HA7uno memB2t8D5sdPnaxoYxlc7QAFMpUJQM34kLqk8Koba45zCOnWG4ank1KYvPblHadwKjhk vX4zt6U+tFfl4flOlXRgueHxWRfKZ+BeHcrlugKjXtUo2KkwbiJOfpqBG+3Kn0/HpL0t J8d1WHtBSGuISt2ZdHI6frfMGXRdiNgOocS4AoChRErmwFFqSJiZHJ2cCGHKfON8NBns EXIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si9379245plr.291.2019.06.24.01.56.29; Mon, 24 Jun 2019 01:56:45 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727921AbfFXIuz (ORCPT + 99 others); Mon, 24 Jun 2019 04:50:55 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:48951 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfFXIuz (ORCPT ); Mon, 24 Jun 2019 04:50:55 -0400 X-Originating-IP: 90.88.16.156 Received: from localhost (aaubervilliers-681-1-41-156.w90-88.abo.wanadoo.fr [90.88.16.156]) (Authenticated sender: maxime.ripard@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 853A11C0007; Mon, 24 Jun 2019 08:50:50 +0000 (UTC) Date: Mon, 24 Jun 2019 10:50:50 +0200 From: Maxime Ripard To: Yangtao Li Cc: rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, davem@davemloft.net, gregkh@linuxfoundation.org, mchehab+samsung@kernel.org, linus.walleij@linaro.org, nicolas.ferre@microchip.com, paulmck@linux.ibm.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 10/11] dt-bindings: thermal: add binding document for h3 thermal controller Message-ID: <20190624085050.horyiz4wp24kzjui@flea> References: <20190623164206.7467-1-tiny.windzz@gmail.com> <20190623164206.7467-11-tiny.windzz@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ytcr75eegmcwn5yh" Content-Disposition: inline In-Reply-To: <20190623164206.7467-11-tiny.windzz@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ytcr75eegmcwn5yh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 23, 2019 at 12:42:05PM -0400, Yangtao Li wrote: > This patch adds binding document for allwinner h3 thermal controller. > > Signed-off-by: Yangtao Li > --- > .../bindings/thermal/sun8i-thermal.yaml | 29 +++++++++++++++++-- > 1 file changed, 26 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml b/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml > index 2c5acc61ed03..1eaf68b5dd5a 100644 > --- a/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml > +++ b/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml > @@ -16,6 +16,7 @@ description: |- > properties: > compatible: > enum: > + - allwinner,sun8i-h3-ths > - allwinner,sun50i-h6-ths > > reg: > @@ -29,13 +30,22 @@ properties: > > clocks: > minItems: 1 > - maxItems: 1 > + maxItems: 2 > > clock-names: > - const: bus > + items: > + - const: bus > + - const: ahb You need a min/maxItems here as well. Otherwise, on the H6, you will have a warning since you asked for an array of two items, bus and ahb, while you only have a single one. > '#thermal-sensor-cells': > - const: 1 > + enum: [ 0, 1 ] > + description: | > + Definition depends on soc version: > + > + For "allwinner,sun8i-h3-ths", > + value must be 0. > + For "allwinner,sun50i-h6-ths", > + value must be 1. This must be checked using a conditional. Something like: if: properties: compatible: const: allwinner,sun8i-h3-ths then: properties: "#thermal-sensor-cells": const: 0 else: properties: "#thermal-sensor-cells": const: 1 > nvmem-cells: > items: > @@ -55,6 +65,19 @@ required: > - '#thermal-sensor-cells' > > examples: > + - | > + ths: ths@1c25000 { > + compatible = "allwinner,sun8i-h3-ths"; > + reg = <0x01c25000 0x400>; > + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; > + clock-names = "bus", "ahb"; > + resets = <&ccu RST_BUS_THS>; > + interrupts = ; > + nvmem-cells = <&tsen_calib>; > + nvmem-cell-names = "calib"; > + #thermal-sensor-cells = <0>; > + }; Same remark here, it won't compile Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --ytcr75eegmcwn5yh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXRCO6gAKCRDj7w1vZxhR xT5JAP9EnWnCbO23gVZGh5xK3A73eXeJMaPcwVSRyTcxDaC75wEA5lbrfaOfqwX9 AZ4QA27PC8pe3lFJDh+4y7Q+DPT+7wI= =s6LE -----END PGP SIGNATURE----- --ytcr75eegmcwn5yh--