From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F066AC2BBD4 for ; Wed, 16 Dec 2020 14:53:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9102233EA for ; Wed, 16 Dec 2020 14:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726144AbgLPOxS (ORCPT ); Wed, 16 Dec 2020 09:53:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbgLPOxS (ORCPT ); Wed, 16 Dec 2020 09:53:18 -0500 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25EDDC0617B0 for ; Wed, 16 Dec 2020 06:52:37 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by baptiste.telenet-ops.be with bizsmtp id 52sa240094C55Sk012sa3M; Wed, 16 Dec 2020 15:52:34 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kpYAL-00BCBr-UG; Wed, 16 Dec 2020 15:52:33 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1kpYAL-005djI-4Z; Wed, 16 Dec 2020 15:52:33 +0100 From: Geert Uytterhoeven To: Luca Ceresoli , Adam Ford , Michael Turquette , Stephen Boyd , Rob Herring Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] dt-bindings: clk: versaclock5: Miscellaneous fixes and improvements: Date: Wed, 16 Dec 2020 15:52:31 +0100 Message-Id: <20201216145231.1344317-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org - Add reference to clock.yaml, and switch to unevaluatedProperties, to stop complaining about the presence of "assigned-clock-rates" and "assigned-clocks" in board DTS files, - Fix typo in "idt,voltage-microvolts" property name, to match example and driver code, - Add missing reference for "idt,voltage-microvolts", - Add missing "additionalProperties: false" for subnodes, to catch typos in properties, - There is no reason to wrap the (single) if condition in an allOf block, - Fix obsolete property names in example. Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml") Signed-off-by: Geert Uytterhoeven --- Notes: 1. The use of "idt,voltage-microvolts" (with trailing S) is a bit unfortunate, as Documentation/devicetree/bindings/property-units.txt suggests to not have the trailing edge. Can we still fix the driver and bindings? While this entered uptstream in v5.9, there are no users in next-20201216. 2. Due to "clock-output-names" being part of dt-schema/schemas/clock/clock.yaml, the presence of this property does not trigger an error. Adding "clock-output-names: false" can fix that. But given this property is deprecated, except for very specific use cases, explicitly allowing it for those few use cases would be better. --- .../bindings/clock/idt,versaclock5.yaml | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml index 2ac1131fd9222a86..14851e76f6342095 100644 --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml @@ -33,6 +33,9 @@ description: | maintainers: - Luca Ceresoli +allOf: + - $ref: clock.yaml# + properties: compatible: enum: @@ -73,40 +76,42 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 6 - idt,voltage-microvolt: + idt,voltage-microvolts: description: The output drive voltage. + $ref: /schemas/types.yaml#/definitions/uint32 enum: [ 1800000, 2500000, 3300000 ] idt,slew-percent: description: The Slew rate control for CMOS single-ended. $ref: /schemas/types.yaml#/definitions/uint32 enum: [ 80, 85, 90, 100 ] + additionalProperties: false + required: - compatible - reg - '#clock-cells' -allOf: - - if: - properties: - compatible: - enum: - - idt,5p49v5933 - - idt,5p49v5935 - then: - # Devices with builtin crystal + optional external input - properties: - clock-names: - const: clkin - clocks: - maxItems: 1 - else: - # Devices without builtin crystal - required: - - clock-names - - clocks - -additionalProperties: false +if: + properties: + compatible: + enum: + - idt,5p49v5933 + - idt,5p49v5935 +then: + # Devices with builtin crystal + optional external input + properties: + clock-names: + const: clkin + clocks: + maxItems: 1 +else: + # Devices without builtin crystal + required: + - clock-names + - clocks + +unevaluatedProperties: false examples: - | @@ -135,13 +140,13 @@ examples: clock-names = "xin"; OUT1 { - idt,drive-mode = ; + idt,mode = ; idt,voltage-microvolts = <1800000>; idt,slew-percent = <80>; }; OUT4 { - idt,drive-mode = ; + idt,mode = ; }; }; }; -- 2.25.1