Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2525410pxb; Tue, 9 Mar 2021 04:58:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTBHWfsUDlZR/v4f7HU2pyUiyfXZdaA3LU//J+hZNnTMmj6AMzQZsq0DvA+zzpJDZ0U9dI X-Received: by 2002:a17:906:1dc2:: with SMTP id v2mr20582971ejh.350.1615294734477; Tue, 09 Mar 2021 04:58:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615294734; cv=none; d=google.com; s=arc-20160816; b=a53SzMTfWkpUo70nQzzDxjhp1/Ynm5FGUzsLoU7miHzk4CB/OU8ojGx4M/hpWlH3fc eDcB2IHcaKiGReJa00Lkl2DV25CVDAlQP+xaWmZ5Oql40rwjmwyS33c/E40xALQa8ZN5 QYlvaDB/SoZwTgXoT5cH2a2sOMoXwF1aFMUFSs3mt0Y5ghyP/EC9WR63mDo1Bxpauhtw LEkj+mxgJJEBo5/3yZGr5Gax608OkY1+O/AJXQj+G83olA8QJpy3xMu48/3DVMekZ4/r Y43fRMBQ9urG1qt2fYcfN9Ss20GfpQWamxdUpWJUAqsqHrpHxzzb8Rg5iHa1pmf23z9H feAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=px5BYZa22n9NMnXf16F73lQRxJVbRAsWmLe25Nhfm2w=; b=tcNfiC3RyAHI9XMpD6ZwJ6tBnLIjEV/5GAv6uqcI61XY8lDR+anQgm7hVDS3rAdAfL IyGEEJ7mR37Ovdcm7l5341E7EaNuKm+flAGwcySTEefFDpBilYRpidhgOcj5GHlXG8pZ Gov6WlJzeIVs/7/QvgBDSaBfnkpj99xgAVP/YriOh4Q22zsHaDvB4vcOrTrVEaNFdNzW 7Ge4xPfHVIVxOYuMHGQtQCdKe10cgFUTXmlvU0vOsTY3nq5Kjt9+N1TU/jTuIjYTirbE LnexiPdi6jQI4HKvazu2f2TckeYuLHzbwisRBiSw9T4L+Ci8+/Ca+iGURLreCFPDC7jw Y2OA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si8444576ejc.1.2021.03.09.04.58.30; Tue, 09 Mar 2021 04:58:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231169AbhCIM5a (ORCPT + 99 others); Tue, 9 Mar 2021 07:57:30 -0500 Received: from mail-vs1-f49.google.com ([209.85.217.49]:42570 "EHLO mail-vs1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbhCIM5J (ORCPT ); Tue, 9 Mar 2021 07:57:09 -0500 Received: by mail-vs1-f49.google.com with SMTP id v123so6708139vsv.9; Tue, 09 Mar 2021 04:57:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=px5BYZa22n9NMnXf16F73lQRxJVbRAsWmLe25Nhfm2w=; b=LAEc4gqKgaSggUIgWNPTd4rc0heuofE9qEuVFUb9pRI0NUjkK1I/LoffSORyhTG2z5 omoK3rZSxKsYJQu31htXwJ+ny551tDPDqiRT285CUqKKkPXtPLlZtlBnQ/rPQqmMV2QR mhw9veos+aVd/c8rxOVd5YETHGfxI6nXwhuURiJdYKzjz9db/BISvvxRrsm5OYX5se/M 8lVVOS4Nsf9oKgU13LaEiHlTC3kMhnYvEsYSLnj0HBt/LP3ifvXPqPCara6G7nln4hgy rVWVgB3WNYCMaawlEmo1/Rl7z4VrL5ttFdEHaMsRBg60q/i7M0T8ljQ6LJqJdmejYMNQ xonQ== X-Gm-Message-State: AOAM533DqJF53D1UUBs4IyKl3nKIF/c5FLQ7r60fRkESKto11777bLxS 3o/N3tlrNFS7WrIjylV2RiEE7bGFR4LCXtS7+C4= X-Received: by 2002:a67:fe90:: with SMTP id b16mr16703554vsr.40.1615294628945; Tue, 09 Mar 2021 04:57:08 -0800 (PST) MIME-Version: 1.0 References: <20210127132840.2019595-1-geert+renesas@glider.be> <20210209192041.GA4168680@robh.at.kernel.org> In-Reply-To: <20210209192041.GA4168680@robh.at.kernel.org> From: Geert Uytterhoeven Date: Tue, 9 Mar 2021 13:56:57 +0100 Message-ID: Subject: Re: [PATCH] [RFC] dt-bindings: power: sysc-remobile: Convert to json-schema To: Rob Herring Cc: Geert Uytterhoeven , Magnus Damm , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , Linux PM list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Tue, Feb 9, 2021 at 8:20 PM Rob Herring wrote: > On Wed, Jan 27, 2021 at 02:28:40PM +0100, Geert Uytterhoeven wrote: > > Convert the Renesas R-Mobile System Controller (SYSC) Device Tree > > binding documentation to json-schema. > > > > Document missing properties. > > Drop consumer example, as it does not belong here. > > > > Signed-off-by: Geert Uytterhoeven > > --- > > Marked RFC, as it does not check deeper levels than the first level of > > the "pm-domains" subnode. > > > > I think the reference in > > > > additionalProperties: > > $ref: "#/patternProperties" > > > > should become "#/patternProperties/0/additionalProperties", but that > > gives: > > > > Unresolvable JSON pointer: 'patternProperties/0/additionalProperties' > > AFAIK, numbers only work on lists (such as 'allOf' values). So I think > you'd want '#/patternProperties/^pm-domains$/additionalProperties'. > However, regex's can have illegal characters. I think URI escaping them > would work, but that gets too readable and unmaintainable for my tastes. > The other way to do this is put the schema under a '$defs'. But in your > case, you have just a fixed string, so there's no need for it to be a > pattern. Just move it to 'properties'. Thank you, I've dropped the patternProperties/regex, and moved the section to properties. The result fails with: Documentation/devicetree/bindings/power/renesas,sysc-rmobile.example.dt.yaml: system-controller@e6180000: pm-domains:c5:a4s@10: missing phandle tag in {'reg': [[10]], '#address-cells': [[1]], '#size-cells': [[0]], '#power-domain-cells': [[0]], 'a3sp@11': {'reg': [[11]], '#power-domain-cells': [[0]]}} From schema: Documentation/devicetree/bindings/power/renesas,sysc-rmobile.yaml Documentation/devicetree/bindings/power/renesas,sysc-rmobile.example.dt.yaml: system-controller@e6180000: pm-domains:c5:a4su@20: missing phandle tag in {'reg': [[20]], '#power-domain-cells': [[0]]} From schema: Documentation/devicetree/bindings/power/renesas,sysc-rmobile.yaml Looking at Documentation/devicetree/bindings/power/renesas,sysc-rmobile.example.dt.yaml there's indeed no "phandle: [[0x1]]" generated, while there is in Documentation/devicetree/bindings/power/renesas,rcar-sysc.example.dt.yaml. Reading other responses from you, that error means that "phandle-array" should be used instead of "phandle". The only question is where? Thanks again! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds