Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2585395ybf; Mon, 2 Mar 2020 11:36:00 -0800 (PST) X-Google-Smtp-Source: ADFU+vt29kwx1vMQ0tEauX2eBpG71UtCCRBy1pFGPXVV58HYR8guNDJ5QimsyCKlBmGCE62TKw0T X-Received: by 2002:a9d:3e89:: with SMTP id b9mr590520otc.3.1583177760331; Mon, 02 Mar 2020 11:36:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583177760; cv=none; d=google.com; s=arc-20160816; b=YwHIen0ebRioblbYSdyaGsLBLKz81ef8cW9pcWlWm//5qx6JK7pWmJGVS78RyMVQu5 4DVgKYyK6XoLC9ot+bqUNs260cWNMWvnNdp/MwYvbGFWomO6LzXQaaYFqNZTOg7Xu1j8 W9TEapd6kEujBCHeGAi3Ln9cKm/z5ypS/GE/2VIv0+YRaeIKjue/N8HSAxezBft62ZtS QEN7fnuh7yk4+t/Kdo9Dkrssbaf5tofFEnc93PJiWHlF1+5cwDD+YrcVaG4ZuD7ljYjO ZNdV2sGmKv9yOzHkJPY1O7SB1DPZTCUitYMn+smvIedCq2N+bSa+7XId+LQY3EAxMgzE Tymw== 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:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=DGfSMIikOY3kreg6w/PuWqLAcsa2i58iD5RE/ITwXCY=; b=ewR+1V++wRCpVxW3uRkbl2KOv/g/DDEIThj/65AoeabM/0wn9LBc9/kUzafedrGyjf LGgB7xsy/L8RNNmBxY2qSLE+nYMMK8Ef8RRSPI+EdL3X+GnMsGhIpFdW2OUbkOApYYcH aN33NX0Bk8FsUlMX28KiOq9qcvcBKoGZ1nUfR/rmg9DA2fpFJmp2hPHMHDJ/4h+X3zpn 3gricpRdAq4YZ9GCyN83cXlEqINykl9cd65nAoxumxDWMb0c6k6Z3+lVQ9DQGaWCwAys 56jigwzWHl+ej+8fZuHAt/6fDJbEJTX0yoVAFp535xqhgEAErcSV37zrYc8eECLHQXCp uwsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="g09F7/at"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x72si6293179oia.194.2020.03.02.11.35.48; Mon, 02 Mar 2020 11:36:00 -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=fail header.i=@crapouillou.net header.s=mail header.b="g09F7/at"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727581AbgCBTfj (ORCPT + 99 others); Mon, 2 Mar 2020 14:35:39 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:48898 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727372AbgCBTfi (ORCPT ); Mon, 2 Mar 2020 14:35:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1583177736; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DGfSMIikOY3kreg6w/PuWqLAcsa2i58iD5RE/ITwXCY=; b=g09F7/at4RhFLxEG/sswSLYFCPUn929KYVnYN8sQRSeEB0Pdtvcon4Ttu3ACgx7WFWbv84 ibS5uRHTmcIoVZ7kOPe1LZVUAKR5NxNKUaaDPU7xtMpX7+Z0LUOXn5HOmX4hxHmPV42byW jkOTjhHZ8kYe5bKuVTU7tcx7T8WL3Gg= Date: Mon, 02 Mar 2020 16:35:20 -0300 From: Paul Cercueil Subject: Re: [PATCH 1/1] dt-bindings: timer: Convert ingenic,tcu.txt to YAML To: Rob Herring Cc: Daniel Lezcano , Thomas Gleixner , Mark Rutland , =?UTF-8?b?5ZGo55Cw5p2w?= , od@zcrc.me, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-Id: <1583177720.3.6@crapouillou.net> In-Reply-To: References: <20200301174636.63446-1-paul@crapouillou.net> <20200301174636.63446-2-paul@crapouillou.net> <1583173481.3.0@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le lun., mars 2, 2020 at 13:07, Rob Herring a=20 =E9crit : > On Mon, Mar 2, 2020 at 12:25 PM Paul Cercueil =20 > wrote: >>=20 >> Hi Rob, >>=20 >>=20 >> Le lun., mars 2, 2020 at 11:06, Rob Herring a >> =E9crit : >> > On Sun, Mar 1, 2020 at 11:47 AM Paul Cercueil=20 >> >> > wrote: >> >> >> > >> > Well, this flew into linux-next quickly and breaks 'make >> > dt_binding_check'... Please drop, revert or fix quickly. >>=20 >> For my defense I said to merge "provided Rob acks it" ;) >>=20 >> >> 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=20 >> bindings >> >> + >> >> +description: | >> >> + For a description of the TCU hardware and drivers, have a=20 >> 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=20 >> schema >> > will be applied to every 'simple-mfd' node. You need a custom=20 >> select >> > entry that excludes 'simple-mfd'. There should be several=20 >> examples in >> > tree to copy. >>=20 >> Why would it be applied to all 'single-mfd' nodes? >=20 > single-mfd? simple-mfd* of course, sorry. > 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'. >=20 >> Doesn't what I wrote >> specify that it needs one of ingenic,*-tcu _and_ simple-mfd? >=20 > Yes, but matching is on any of them. You need to add: Alright, will do. Is there a reason why it's done that way? It sounds a=20 bit counter-intuitive. > select: > properties: > compatible: > contains: > enum: > - ingenic,jz4740-tcu > - ingenic,jz4725b-tcu > - ingenic,jz4770-tcu > - ingenic,x1000-tcu > required: > - compatible >=20 >> I'm not sure I understand what you mean. >>=20 >> I did grep for 'single-mfd' in all YAML files in Documentation/ and >> nothing really stands out. >=20 > I guess even without the typo it was harder to find an example than I=20 > thought. >=20 > 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. Alright, thanks for the help. -Paul =