Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4945150ybb; Tue, 24 Mar 2020 08:09:22 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs8hTEqcfYG04MgGDwE3WuNdWnf45YnB0ItZDAwMvE4QGvZxcVU6DRJbp74LXy8RlU+zlnX X-Received: by 2002:aca:aa0a:: with SMTP id t10mr3524384oie.38.1585062562409; Tue, 24 Mar 2020 08:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585062562; cv=none; d=google.com; s=arc-20160816; b=rEWwcVFzVY14K6wXZPdD4lO2RGjaZuBWP0WEc4YV3vnzgp5t0OJVJm6DMJn2GoVMhL ZZ//Az58Ku7OiA2ME3nibC6VeGHa054qtXW4/xx7xfCkBlw1gNoHw32YvO13RFODTebl eRGNXYprzOWe95OYTBEoG4kzh41hw4uGw9TwIj6TlWvllfnmoO93nUbpjxxPjIQv2HqV dpwP6RvLig9nsRSo5C5xwK6mdvEhlRAR/eTncpbS4Q2pewjgZrYFvfR81/wrq/I7b1rR +ShEBHyHtZVylT9PvIeSTGc7d0q8NelqTlGHyIL5W1X4fJqw4BfqvqucElwBmMfTq7E4 ci9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sNkPgKFW2FkPne96ZybfV5Rbkt6/xvn0ru1mJp/U+j4=; b=Cagom6bEpipLZi5JMw8nhsYgbt9+uXohfLGg9x5uYKUdFJFVk8UoSiSvU3cwHSJhc+ Vmu7lmo8S4j3GXQNr+gOJK2EwDsF8om3HSNgWk2xnuwz4BFAP+TXyOaEjl0KGf0OXnXs 8Ck/YrhJ9stmWPD84kheo7zQ3cTh2GgtJb2zm9PmP9Ubh1UBmBL1GPPQF4mNulSwVPt5 VsZ7EhwnmtNIzrI2aTVb6vQvlAqsxBq5+d6OuBlnFOP7iCVFApDDCos6o/TDq42ca1Fl dFGwH+DZ3oJP3wIYGBsCGbIwqLn4RQgmsAfEGiyKxDKJhfhrdz/B3poA5txyfGn2YmDX STMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fc+aeEH5; 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 i15si9280856ots.121.2020.03.24.08.09.07; Tue, 24 Mar 2020 08:09:22 -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; dkim=pass header.i=@kernel.org header.s=default header.b=fc+aeEH5; 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 S1728089AbgCXPGV (ORCPT + 99 others); Tue, 24 Mar 2020 11:06:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:51268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727736AbgCXPGV (ORCPT ); Tue, 24 Mar 2020 11:06:21 -0400 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2BAC520775; Tue, 24 Mar 2020 15:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585062380; bh=8pIS4vs8NHSn+hwQhqH3u3RNHDcaAGCJDHvJt0tjNa4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fc+aeEH5arhksV19znprIHLe75k2fAW9cwMJmmeIORp/Pe8rgRiFxpGXCq0aafd0T Fvm/XvCFvYRxQBeqWqjjC+JfnLqguSbXh8UhE1TU4rEnzeTDxYbod/sM84Hl92iRlr JMstjao+AeVl6QpFGL2frE+DycngLxvZOPG59jqo= Received: by mail-qk1-f179.google.com with SMTP id k13so7796136qki.2; Tue, 24 Mar 2020 08:06:20 -0700 (PDT) X-Gm-Message-State: ANhLgQ3nWe7ULCSNnoAzpx/XfxCX3iuPJge3LiMzggjfmzGBU1q/6xkO GVVsj280NZw84dI0n84bPWC9LAkWNzXW9ZedLQ== X-Received: by 2002:a37:4a85:: with SMTP id x127mr26564313qka.152.1585062379195; Tue, 24 Mar 2020 08:06:19 -0700 (PDT) MIME-Version: 1.0 References: <8a0cfe9e3018f7996c1563035bee76048941beb4.1583412540.git.amit.kucheria@linaro.org> <20200311144933.GA21587@bogus> In-Reply-To: From: Rob Herring Date: Tue, 24 Mar 2020 09:06:07 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] dt-bindings: thermal: Add yaml bindings for thermal zones To: Amit Kucheria Cc: LKML , linux-arm-msm , Stephen Boyd , Matthias Kaehlcke , Daniel Lezcano , Zhang Rui , Linux PM list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 24, 2020 at 4:33 AM Amit Kucheria wrote: > > On Tue, Mar 24, 2020 at 2:46 AM Rob Herring wrote: > > > > On Mon, Mar 23, 2020 at 2:46 PM Amit Kucheria wrote: > > > > > > Hi Rob, > > > > > > Thanks for the review. > > > > > > On Wed, Mar 11, 2020 at 8:19 PM Rob Herring wrote: > > > > > > > > On Thu, Mar 05, 2020 at 06:26:43PM +0530, Amit Kucheria wrote: > > > > > As part of moving the thermal bindings to YAML, split it up into 3 > > > > > bindings: thermal sensors, cooling devices and thermal zones. > > > > > > > > > > The thermal-zone binding is a software abstraction to capture the > > > > > properties of each zone - how often they should be checked, the > > > > > temperature thresholds (trips) at which mitigation actions need to be > > > > > taken and the level of mitigation needed at those thresholds. > > > > [...] > > > > > > > > + /* ... */ > > > > > + > > > > > + gpu-thermal-top { > > > > > > > > This one is not going to match (which should cause an error). > > > > > > Good catch. Unfortunately, this isn't getting caught. Nor is the > > > 12-char limitation before -thermal in the thermal zone name. I can't > > > figure out why. > > > > That's because this schema has to be included by another schema which > > matches on a parent node containing 'thermal-zones'. If > > 'thermal-zones' can be at the root node, then you should rework this > > such that you have $nodename: {const: thermal-zones} as a top-level > > property. > > I've done all the change requested in the review(see attached patch), > including moving to > > properties: > $nodename: > const: thermal-zones > > but that generates a bunch of errors similar to: > > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/zte.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/psci.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/sunxi.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/sprd/sprd.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/calxeda.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/ti/ti,davinci.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/spear.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/ti/nspire.example.dt.yaml: > /: $nodename:0: 'thermal-zones' was expected > > It seems like dtc is expecting every node to have a thermal-zones node? > > Looking at other root nodes such as cpus.yaml, the main difference I > noticed was the absence of the "select: true" property. However, if I > remove that, we go back to the schema not being applied. 'select: true' should be dropped. It will be applied to any 'thermal-zones' nodes. The generated 'select' will use $nodename if compatible is not present for the schema. I tested that putting an error in the example works. > You mentioned that the thermal-zones schema needs to included by > another schema. What did you mean by that? Nevermind, I wasn't thinking that it's a top-level node. If it was a child node, then you'd want to include it from the parent schemas. Rob