Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2563395ybf; Mon, 2 Mar 2020 11:08:56 -0800 (PST) X-Google-Smtp-Source: ADFU+vv525Xighz9wzIFE4wk44k0kC2wVWJPIWaNEQdOZmGnnANcU/K+1ZVSPGtA0eFBbje5j0XB X-Received: by 2002:aca:b2c5:: with SMTP id b188mr392062oif.163.1583176136046; Mon, 02 Mar 2020 11:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583176136; cv=none; d=google.com; s=arc-20160816; b=CTfuU0+Ee5/CE9dveWD5HsisKuej4d/dhIdPyZ21lcXf4jENxvD0+kGl/zSqhQPsTy RkL0IhdhalKZT/azizZHCNWGErUjkS6wAkd3JdZEKGg3Qq1gnkMP2zz+OSrNNgKzQjsZ y9YhWrCYEsnGtQB2s3XpG5Hsncn/IOH1BLJ0722xmIsnK4luLKLCC1XfbLoqNdjtfDjl BbvkD6zVystaL68z9gIq1ZKDD14s8GpqCyhvodNt1oe9/PW6u0wxleB+noum8aXO4go3 NcAbj/TGhZb850SX4bvDDTnWRivk21jpVxCG4++wJZVLztos5wLmhk8ganaNAkpMw0U/ vtvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=r07xmNeDcWVuiIEL8nHq1eq4gxtybXyJ94Di3akvLJU=; b=VkhbwwWOtgizg+Cpq5fYLJSaCFP+ytC5RK9XkALFbwrrSnvSYPlaOjYQFLr72VnGq9 HEAR4VyFPuWV1s7KKUkzJvtqbKkqbT4ztlitw2dXecXDUG0a9MfiRNkqpqQd+PEgpGqY FW/46Mczyxhn8aaNFxP2OyGYd8v+Oqrf4SHkwR9HbFool2SclJVCnIAAAu/yH8vERk1j MExQpVMhFijPkkXzUHyN0ZyTDvAgDdifMnbxdrp0XmtP+shcJv1Vs/IeUW0HZY/UjNz/ YtqzBwj6ugJ89keyNZpWV77Y3csWQ8orYms15UPgJiDw/Rr5VcOdeRNci57E86TP/CQj ahqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ykR8CdMF; 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 y22si6594597oti.269.2020.03.02.11.08.44; Mon, 02 Mar 2020 11:08:56 -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=ykR8CdMF; 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 S1727413AbgCBTHf (ORCPT + 99 others); Mon, 2 Mar 2020 14:07:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:45382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727126AbgCBTHe (ORCPT ); Mon, 2 Mar 2020 14:07:34 -0500 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 864A42166E; Mon, 2 Mar 2020 19:07:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583176053; bh=QGcsFJqfxX2CH6Jn461c3OOCYIcfNyPBNlEZzre/Bs4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ykR8CdMFysZ8qQKYbVC0iSlyGhLnHUned5fbfqhUuTRZtoSA1q2vlelSnA8KQ9mUq e9Ci76+mzNKMuVuYs6OGGFhlCSN4w1+vJcuAghJn21a95hoO9FvfZWjCw/vzxqJvkh 8RN7sgPrYXUROt8gz0e9vLVnhyCMLGkSgzsZPLaU= Received: by mail-qv1-f46.google.com with SMTP id r15so434470qve.3; Mon, 02 Mar 2020 11:07:33 -0800 (PST) X-Gm-Message-State: ANhLgQ3Zasxy8E0hxwCYSAlCu0CkI0CdautPsV4etk35g+vvSRqSNQGR wKYZ3MRnR4+I9G24C2idblr7cUPVF+Nun3i39A== X-Received: by 2002:a0c:f68f:: with SMTP id p15mr776291qvn.79.1583176052684; Mon, 02 Mar 2020 11:07:32 -0800 (PST) MIME-Version: 1.0 References: <20200301174636.63446-1-paul@crapouillou.net> <20200301174636.63446-2-paul@crapouillou.net> <1583173481.3.0@crapouillou.net> In-Reply-To: <1583173481.3.0@crapouillou.net> From: Rob Herring Date: Mon, 2 Mar 2020 13:07:20 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] dt-bindings: timer: Convert ingenic,tcu.txt to YAML To: Paul Cercueil Cc: Daniel Lezcano , Thomas Gleixner , Mark Rutland , =?UTF-8?B?5ZGo55Cw5p2w?= , od@zcrc.me, "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 2, 2020 at 12:25 PM Paul Cercueil wrote: > > Hi Rob, > > > Le lun., mars 2, 2020 at 11:06, Rob Herring a > =C3=A9crit : > > On Sun, Mar 1, 2020 at 11:47 AM Paul Cercueil > > wrote: > >> > > > > Well, this flew into linux-next quickly and breaks 'make > > dt_binding_check'... Please drop, revert or fix quickly. > > For my defense I said to merge "provided Rob acks it" ;) > > >> Convert the ingenic,tcu.txt file to YAML. > >> > >> Signed-off-by: Paul Cercueil > >> --- > >> .../devicetree/bindings/timer/ingenic,tcu.txt | 138 ---------- > >> .../bindings/timer/ingenic,tcu.yaml | 235 > >> ++++++++++++++++++ > >> 2 files changed, 235 insertions(+), 138 deletions(-) > >> delete mode 100644 > >> Documentation/devicetree/bindings/timer/ingenic,tcu.txt > >> create mode 100644 > >> Documentation/devicetree/bindings/timer/ingenic,tcu.yaml > > > > > >> diff --git > >> a/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml > >> b/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml > >> new file mode 100644 > >> index 000000000000..1ded3b4762bb > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml > >> @@ -0,0 +1,235 @@ > >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/timer/ingenic,tcu.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Ingenic SoCs Timer/Counter Unit (TCU) devicetree bindings > >> + > >> +description: | > >> + For a description of the TCU hardware and drivers, have a look at > >> + Documentation/mips/ingenic-tcu.rst. > >> + > >> +maintainers: > >> + - Paul Cercueil > >> + > >> +properties: > >> + $nodename: > >> + pattern: "^timer@.*" > > > > '.*' is redundant. > > > >> + > >> + "#address-cells": > >> + const: 1 > >> + > >> + "#size-cells": > >> + const: 1 > >> + > >> + "#clock-cells": > >> + const: 1 > >> + > >> + "#interrupt-cells": > >> + const: 1 > >> + > >> + interrupt-controller: true > >> + > >> + ranges: true > >> + > >> + compatible: > >> + items: > >> + - enum: > >> + - ingenic,jz4740-tcu > >> + - ingenic,jz4725b-tcu > >> + - ingenic,jz4770-tcu > >> + - ingenic,x1000-tcu > >> + - const: simple-mfd > > > > This breaks several examples in dt_binding_check because this schema > > will be applied to every 'simple-mfd' node. You need a custom select > > entry that excludes 'simple-mfd'. There should be several examples in > > tree to copy. > > Why would it be applied to all 'single-mfd' nodes? single-mfd? The way the tool decides to apply a schema or not is my matching on any of the compatible strings (or node name if no compatible specified). You can override this with 'select'. > Doesn't what I wrote > specify that it needs one of ingenic,*-tcu _and_ simple-mfd? Yes, but matching is on any of them. You need to add: select: properties: compatible: contains: enum: - ingenic,jz4740-tcu - ingenic,jz4725b-tcu - ingenic,jz4770-tcu - ingenic,x1000-tcu required: - compatible > I'm not sure I understand what you mean. > > I did grep for 'single-mfd' in all YAML files in Documentation/ and > nothing really stands out. I guess even without the typo it was harder to find an example than I thoug= ht. Note that I think I'll make the tool exclude 'simple-mfd', but it will take some time for users to update so you still need to fix this. Rob