Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp531535rwb; Tue, 25 Jul 2023 21:07:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlGQ8BzPp8HJ+Bc8bBVdsTx4FtZhWqU+SP8NAzRHSdyvZ4lMc3w07wY3TumquHKw98EdZcmi X-Received: by 2002:aa7:c50c:0:b0:522:3081:ddb4 with SMTP id o12-20020aa7c50c000000b005223081ddb4mr606164edq.20.1690344454638; Tue, 25 Jul 2023 21:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690344454; cv=none; d=google.com; s=arc-20160816; b=sCtzO7PVs1/9U/a7/pL9tu8RJxf4EVj3H/H0VLnAlR0pNDdiefE9uwOVxyMUKmGGxK nt6sgpu0KY8qPlgHwqqMPfczU5scXrm1qH+1ojRY/73/2ABgMvGDOsqSL7eYVVWrXECg jTiBxLEATuVLZc1dI0MCDNSetocjNp3PjL3jFSwFKFq0/dD7RWGYRW2f6mkAFAzN63wJ YVXqfeKo5CW2o4INgupVvn6IozeyxIkTgljuB8pQD5thkI1bwmi/RxLgEHCMarAKxZRU 4rg4QmVMYLWSsv/8uzYBh0kgdJY9zqTh1gua4OqO1mMmhvNx32QDFP+kEtzq0zMqBypy kFjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jTfF5kWovWy3Ipck5xL7ju2FNQudvnY/uOggotN+9o8=; fh=Z6vCBtMxqgjfIEkL6TPYBJZWUI90GrMpDPdCepMFLIs=; b=R2WJXDu5aiZOrHIPdnJLI1V/NV+UDP4OYTelsh5KQFITR+zvjrS1DiD3sCYzoh/4TQ FxAvJIDRYqHLesD6tL2lFWWHsWmjnn6Qfkm0oLL1GvXV0kN9C3I6g07QwQNqbrZYPfvo HYUh+8+ZYQjI4VuFuc6Ly6+BZXnc8OX44vUhfhC8kg3LJ+PdtU/O//YeZVy3UCrW3Fc2 Uq2G09qbIPpPqejmuKl45EvxDgneaK7fyqP1MaMQ1CEpB9P07rA8+N0tLbImzWIXnTaE yqf54ZvdWxScEkcTlnDVtm0yn1dG8PgoKQ34lLpew4xi6Y7cNm+R0+g13YbFS6+tRKTQ L4jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oj8JicSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020aa7c503000000b005226ec9b2c4si460937edq.517.2023.07.25.21.07.10; Tue, 25 Jul 2023 21:07:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oj8JicSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231186AbjGZDgK (ORCPT + 99 others); Tue, 25 Jul 2023 23:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjGZDgE (ORCPT ); Tue, 25 Jul 2023 23:36:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B840268E; Tue, 25 Jul 2023 20:36:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0D5C611B1; Wed, 26 Jul 2023 03:36:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21307C433C8; Wed, 26 Jul 2023 03:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690342562; bh=sxLcDLKkcr5fwf9GynK67WfceXdUXdkfWJfBfqa8qr0=; h=From:To:Cc:Subject:Date:From; b=Oj8JicSe4yn78ANfBFdZ0dy7fqDM3pwnVNMlbfSX0oD4McOrXlyN0F5xu/IuFH7aM T2SFsNfyHlRSktyG9t/o/0tmR8yLUwTas4OjeKNLsACWJEqkW40OiwpC+hYDWZx/+N Qenc9IVkrDuNqIZryUnUgzkOHdJASktg/tQbqoiyipLS66IAjE2R0b58pi5DVO/Bji UlyApIBvVqkaBVBXu1Acch3aAp3RNeiFF6gYi3pSB9GLiUP+jdl9OIn0datExghZhU WYQaWt/CH3diZdRn7IjXnw0nP1Fnp68gquVLUw+WliH987Qa0Zp0TD8KbjwDrtfqta AktIvWzEJWt8w== Received: (nullmailer pid 174492 invoked by uid 1000); Wed, 26 Jul 2023 03:35:59 -0000 From: Rob Herring To: Lee Jones , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas Date: Tue, 25 Jul 2023 21:35:54 -0600 Message-Id: <20230726033554.174365-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no need for 'additionalProperties' in the if/then schema as there's already 'unevaluatedProperties' in the parent schema. With 'additionalProperties' dropped, 'compatible' and 'phandle' don't need to be listed in the conditional schemas as 'compatible' is already in the main section and 'phandle' will be implicitly added. Signed-off-by: Rob Herring --- .../mfd/allwinner,sun6i-a31-prcm.yaml | 43 ++----------------- .../mfd/allwinner,sun8i-a23-prcm.yaml | 42 ------------------ 2 files changed, 3 insertions(+), 82 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml b/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml index cf94176fe1eb..8789e3639ff7 100644 --- a/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml +++ b/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml @@ -34,6 +34,9 @@ patternProperties: - allwinner,sun6i-a31-clock-reset - fixed-factor-clock + required: + - compatible + allOf: - if: properties: @@ -55,25 +58,17 @@ patternProperties: "#clock-cells": const: 0 - # Already checked in the main schema - compatible: true - clocks: maxItems: 2 clock-output-names: maxItems: 1 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names - additionalProperties: false - - if: properties: compatible: @@ -85,25 +80,17 @@ patternProperties: "#clock-cells": const: 0 - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 clock-output-names: maxItems: 1 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names - additionalProperties: false - - if: properties: compatible: @@ -119,9 +106,6 @@ patternProperties: offset of the bit controlling this particular gate in the register. - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 @@ -129,16 +113,11 @@ patternProperties: minItems: 1 maxItems: 32 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names - additionalProperties: false - - if: properties: compatible: @@ -150,9 +129,6 @@ patternProperties: "#clock-cells": const: 0 - # Already checked in the main schema - compatible: true - clocks: maxItems: 4 description: > @@ -162,16 +138,11 @@ patternProperties: clock-output-names: maxItems: 1 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names - additionalProperties: false - - if: properties: compatible: @@ -183,16 +154,8 @@ patternProperties: "#reset-cells": const: 1 - # Already checked in the main schema - compatible: true - - phandle: true - required: - "#reset-cells" - - compatible - - additionalProperties: false required: - compatible diff --git a/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml b/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml index 16c80a7eec49..e51f85519911 100644 --- a/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml +++ b/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml @@ -57,25 +57,17 @@ patternProperties: "#clock-cells": const: 0 - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 clock-output-names: maxItems: 1 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names - additionalProperties: false - - if: properties: compatible: @@ -91,9 +83,6 @@ patternProperties: offset of the bit controlling this particular gate in the register. - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 @@ -101,16 +90,11 @@ patternProperties: minItems: 1 maxItems: 32 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names - additionalProperties: false - - if: properties: compatible: @@ -122,34 +106,8 @@ patternProperties: "#reset-cells": const: 1 - # Already checked in the main schema - compatible: true - - phandle: true - required: - "#reset-cells" - - compatible - - additionalProperties: false - - - if: - properties: - compatible: - contains: - const: allwinner,sun8i-a23-codec-analog - - then: - properties: - # Already checked in the main schema - compatible: true - - phandle: true - - required: - - compatible - - additionalProperties: false required: - compatible -- 2.40.1