From patchwork Wed Jul 26 03:35:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 126049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp159617vqo; Tue, 25 Jul 2023 20:59:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1Agl1Y9vSlSDAs2u+n+aNRvVKg9PrBTguUMprsa3GJsyor3p1psUm9IN1Gf/VdHyTjDv+ X-Received: by 2002:aa7:d0d4:0:b0:522:3a37:bb32 with SMTP id u20-20020aa7d0d4000000b005223a37bb32mr607021edo.1.1690343944132; Tue, 25 Jul 2023 20:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690343944; cv=none; d=google.com; s=arc-20160816; b=CWy4gOepr8ZkZxqnVWHjjdLqhEP/Xn3LSenJmDhhfcrGcNZGRD0+Dwo5yCa6+E16El Sgv2RV/FyG8VgXVmejA3jMdf6/fitxJy/pOG0fz15JG0l+MccJ0EpEnZUTGmL4zXTLCS Mq1PGGTT0GAplZRozThktQlynYPh36rUyaqso4QaeUfutXNphmBqDGNMC8uYADCriwHG KA9+HN/xVCi1hOHGPYMMq0fCv5w3aML2nSGvca0FCJIBSEa+zZaoP446VcuRq5NgvUR9 4SrDPwXCC/Z5FtRiDS5Q4mM075iopXuYMY+zRVmfY/GgV0P8qoXDG1bNj+MUd70N7ypQ NB6g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020aa7c2cf000000b0051dd525dd79si8671966edp.521.2023.07.25.20.58.40; Tue, 25 Jul 2023 20:59:04 -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 S229913AbjGZDgL (ORCPT + 99 others); Tue, 25 Jul 2023 23:36:11 -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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772454091119273089 X-GMAIL-MSGID: 1772454091119273089 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