From nobody Tue Sep 9 12:30:53 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0582DC0015E for ; Wed, 26 Jul 2023 03:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231247AbjGZDgM (ORCPT ); Tue, 25 Jul 2023 23:36:12 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =20 + required: + - compatible + allOf: - if: properties: @@ -55,25 +58,17 @@ patternProperties: "#clock-cells": const: 0 =20 - # Already checked in the main schema - compatible: true - clocks: maxItems: 2 =20 clock-output-names: maxItems: 1 =20 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names =20 - additionalProperties: false - - if: properties: compatible: @@ -85,25 +80,17 @@ patternProperties: "#clock-cells": const: 0 =20 - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 =20 clock-output-names: maxItems: 1 =20 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names =20 - additionalProperties: false - - if: properties: compatible: @@ -119,9 +106,6 @@ patternProperties: offset of the bit controlling this particular gate in the register. =20 - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 =20 @@ -129,16 +113,11 @@ patternProperties: minItems: 1 maxItems: 32 =20 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names =20 - additionalProperties: false - - if: properties: compatible: @@ -150,9 +129,6 @@ patternProperties: "#clock-cells": const: 0 =20 - # Already checked in the main schema - compatible: true - clocks: maxItems: 4 description: > @@ -162,16 +138,11 @@ patternProperties: clock-output-names: maxItems: 1 =20 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names =20 - additionalProperties: false - - if: properties: compatible: @@ -183,16 +154,8 @@ patternProperties: "#reset-cells": const: 1 =20 - # Already checked in the main schema - compatible: true - - phandle: true - required: - "#reset-cells" - - compatible - - additionalProperties: false =20 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 =20 - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 =20 clock-output-names: maxItems: 1 =20 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names =20 - additionalProperties: false - - if: properties: compatible: @@ -91,9 +83,6 @@ patternProperties: offset of the bit controlling this particular gate in the register. =20 - # Already checked in the main schema - compatible: true - clocks: maxItems: 1 =20 @@ -101,16 +90,11 @@ patternProperties: minItems: 1 maxItems: 32 =20 - phandle: true - required: - "#clock-cells" - - compatible - clocks - clock-output-names =20 - additionalProperties: false - - if: properties: compatible: @@ -122,34 +106,8 @@ patternProperties: "#reset-cells": const: 1 =20 - # 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 =20 required: - compatible --=20 2.40.1