Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1989758ybe; Tue, 3 Sep 2019 06:31:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNgqVW2gsI/PB/GN5bGRW5LUtu55MEmxS1E6lnTwZIxTCzcUdoLatP4msAk0hMIoURJIhA X-Received: by 2002:a17:90a:8911:: with SMTP id u17mr25900pjn.128.1567517514155; Tue, 03 Sep 2019 06:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567517514; cv=none; d=google.com; s=arc-20160816; b=eunHztbIS7l/OJwarW1Mp557cNZwRcASSUTmUXjvm360bw6EJQTkwl/h6aVQ8CXwA4 PI0tZMIyOCSoHcOnB3g6myEeqK65iumHLe+YbAbnH+Z1IZxSu/pF+3a+/gejt0GT25kG WM/teDYQhy+0EGRMhs9bN2+VUIeoZslUodgjP4tuTgySoCye9x3dLq3Ayoh0xoGuzYvU kIa4Q9duz0maCJog7sB5Wh9IemkT6VT5VIHcaf79iqtQZMI27xmLe1Z2sZ/kNCIJfPIw HKzRz0e5dvIZuMsp8R4RBNNpoRn9x6TVW6l9HU8/nlamdZ1zSwiVn/fqAcHNDbBHJnLj yvbA== 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=PwqW5QtVNXWcFcYivGOPb2aCMDYWlXkMNIFKP/yaQqU=; b=kxFXfKvHVtD2y5zbxhRpFfPgCD9qtgHUF3b+AAy4ch+7yDVfMNjl7VaF+XRbZiZ/3A f/woLd0ZQVJhwuSfxx1hzfAOWSVr5fMT/2TvFSrl94qSrRRLdd4fAdaBRDIM0fOeE3Lb rHTmrLzyIbOfmruFe0nAGZUjc7n4eDy7RxpUTZZRSJ3vsKktoadUUQvSGhK+WRss72wT PtMWfLHQ+vczgC3W8039iS/KisTceJ05AZbiPuQNrMZoTgYiBPZqPlGuq7jZcgpWEKRf rFWlDkL8jwVVlkax9JztpcBv9IZbksF2zCidk1eNtfPp7Ad7PQXYaDzfn6I6/proNJZG 2XvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qaXN86v6; 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 v123si18352592pfb.241.2019.09.03.06.31.37; Tue, 03 Sep 2019 06:31:54 -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=qaXN86v6; 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 S1729299AbfICN3e (ORCPT + 99 others); Tue, 3 Sep 2019 09:29:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:32960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729066AbfICN3d (ORCPT ); Tue, 3 Sep 2019 09:29:33 -0400 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 498CA23402; Tue, 3 Sep 2019 13:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567517372; bh=NLqCL4CDXLU3XgXKCj95PxujHWeCjp562H7YUcMntWI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qaXN86v6cIyTWdnvtaZOQQfBuuLThLlMRA/EJyQNgmyoLCjT/75zE/M4mRQeArqAE q4YgAkDS6yIyQVA1WxKIVB7rtdCigj9Sz0V6NzXh5PlLXZooECitbVO6sWthzskktB K+ItPCsbY4BLi25J8cwa71OUpyPJxZShfeyXk83Q= Received: by mail-lf1-f44.google.com with SMTP id r134so12000449lff.12; Tue, 03 Sep 2019 06:29:32 -0700 (PDT) X-Gm-Message-State: APjAAAXceZ1F0VtCGnv9s3brmXuw2bEDDN7WCQ0LhshmWuK9GoK3nIy0 07jSwK7TNhywRrFEtPhPHXfCyUK6Y2dMkQXBWdw= X-Received: by 2002:ac2:41c2:: with SMTP id d2mr6978921lfi.24.1567517370489; Tue, 03 Sep 2019 06:29:30 -0700 (PDT) MIME-Version: 1.0 References: <20190902150336.3600-1-krzk@kernel.org> In-Reply-To: From: Krzysztof Kozlowski Date: Tue, 3 Sep 2019 15:29:19 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: power: syscon-reboot: Convert bindings to json-schema To: Rob Herring Cc: Sebastian Reichel , Mark Rutland , "open list:THERMAL" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" 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, 3 Sep 2019 at 15:12, Rob Herring wrote: > > arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml: syscon-reboot: > > {'regmap': [[9]], 'mask': [[1]], '$nodename': ['syscon-reboot'], > > 'value': [[1]], 'offset': [[1024]], 'compatible': ['syscon-reboot']} > > is valid under each of {'required': ['mask']}, {'required': ['value', > > 'mask']}, {'required': ['value']} > > Ahh, right. 'anyOf' is what we want: > > anyOf: > - required: [ value ] > - required: [ mask ] This triggers meta-schema error: SCHEMA Documentation/devicetree/bindings/processed-schema.yaml Traceback (most recent call last): File "/home/kozik/.local/lib/python3.5/site-packages/dtschema/lib.py", line 429, in process_schema DTValidator.check_schema(schema) File "/home/kozik/.local/lib/python3.5/site-packages/dtschema/lib.py", line 575, in check_schema raise jsonschema.SchemaError.create_from(error) jsonschema.exceptions.SchemaError: Additional properties are not allowed ('anyOf' was unexpected) Failed validating 'additionalProperties' in metaschema['allOf'][0]: {'$id': 'http://devicetree.org/meta-schemas/base.yaml#', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'allOf': [{'$ref': 'http://json-schema.org/draft-07/schema#'}], 'description': 'Metaschema for devicetree binding documentation', 'properties': {'$id': {'pattern': 'http://devicetree.org/schemas/.*\\.yaml#'}, '$schema': {'enum': ['http://devicetree.org/meta-schemas/core.yaml#', 'http://devicetree.org/meta-schemas/base.yaml#']}, 'additionalProperties': {'type': 'boolean'}, 'allOf': {'items': {'propertyNames': {'enum': ['$ref', 'if', 'then', 'else']}}}, 'definitions': True, 'dependencies': True, 'description': True, 'else': True, 'examples': {'items': {'type': 'string'}, 'type': 'array'}, 'if': True, 'maintainers': {'items': {'format': 'email', 'type': 'string'}, 'type': 'array'}, 'oneOf': True, 'patternProperties': True, 'properties': True, 'required': True, 'select': {'allOf': [{'$ref': 'http://json-schema.org/draft-07/schema#'}, {'oneOf': [{'properties': {'properties': True, 'required': True}, 'type': 'object'}, {'type': 'boolean'}]}]}, 'then': True, 'title': {'maxLength': 100}, 'unevaluatedProperties': {'type': 'boolean'}}, 'required': ['$id', '$schema', 'title', 'maintainers']} Best regards, Krzysztof