From patchwork Wed Mar 15 18:37:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 70383 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp66728wrt; Wed, 15 Mar 2023 12:01:58 -0700 (PDT) X-Google-Smtp-Source: AK7set9Sqhb4NVgCk922v0TC6H1QievAs+7VpkxAugaMWJhe+5qrMqYe0GIYNWNaC7sb72AlX64a X-Received: by 2002:a05:6a00:6:b0:625:a027:c123 with SMTP id h6-20020a056a00000600b00625a027c123mr407351pfk.22.1678906918170; Wed, 15 Mar 2023 12:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678906918; cv=none; d=google.com; s=arc-20160816; b=mGsmz2tueg9LqRhUJc0neR3wUZA2eAQN8DUMNgmDPxvtNOGklozwifrFz2vggDKJYf X9EUvrI2w171ZaUay4APN1wZaqxdx9jX2rVqHPwg7dzCpgGsVu8q3OveNrBoTfI5Rrtw gr4K0/YapZfRw9eAb81OEzNvU5i7yEfW/WMYTY3SFuw8VP1T1x5t+83XE03whtQsO2wj 4xJsZX/rqaKmjocYvJ+rwno40HSIOEOizactg8I8lOeQ9X/AqN9Ix7vebeV6vpf0ZJDK L/yFUhFi4LBjUbfRelA6fp/Fdpn9DRnpWnjffgjpIBiFE9Us/3/bkeNclVQsoftJgfxH TLKw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LrztAMualL/ivEQAU1YWFaz1UWLjxom8eodDqkW5k2M=; b=LqAWvyBKgKonYUHnWpuNkGJN4wEDNGx43Rf+IbO9NYCey1OdTgoWU8WlsOvY/ZFXjP V4LIJ7gsCTgun6ZeXhJ7I8DQw5wtSFmSie1nqcNGlLkWr8E3wvNusX+pNpvv5nDzELZx EuCW7Ym6OrkTyBxcR/3nONPh7IdaXiocWNvv0tdGbbcBBSDF5jhm9Npzz0JtlqmCSLaq NOXzKcJn9kFzSuHfveoy8i8f7+z7+CeX0tTG+W4UvBonyR6barx/NJOrlHGmFuATEFvW UlLM8TVA457dun1vHGOGrD51l1yha66lOxFCT3doTAGvoitjtyLQHoG3zW9PeNgNQzYU oeGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sMxDonUQ; 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 w32-20020a631620000000b004da377c33bbsi5720947pgl.85.2023.03.15.12.01.42; Wed, 15 Mar 2023 12:01:58 -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=sMxDonUQ; 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 S230333AbjCOSiS (ORCPT + 99 others); Wed, 15 Mar 2023 14:38:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231773AbjCOSiJ (ORCPT ); Wed, 15 Mar 2023 14:38:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B139BA58; Wed, 15 Mar 2023 11:37:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C529D61E3C; Wed, 15 Mar 2023 18:37:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC07BC433AA; Wed, 15 Mar 2023 18:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678905457; bh=+IVvkQrzSA4hm1JV3KHEDzwagCuncHGxrIZJFvXhdgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sMxDonUQqA6TI49xCL1QMkaCrG3vR/KwE7uNeC5xVmj009k50w8zzmXGT1N3WvosY BWxFHsJ/6in114u5xYmtxdPzysDKTwhgQCokBaReGLo57r9cEbv2BIvly9M84EmU3c gfTNYOr2t+IxfnjE3DnAsxKRNMLde5hzdyDVuOaMXYw68bqeuf3o+zgk/Qy9IfxQvr 43/bU1i6g3ROF7IVv/Ao20vGwLBM0jax0pbKfhnoFDxtBqFsLBmTgoGnq1Wl9fXpjr cM75aVLWe90GbS2MZI7Fvf8O+oQ0eH1w8Bv1x5Z1wwl6hpzGfBZjC5nxlT83QTo8vb NiMPiM85ZR2nw== From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, Brendan Higgins , David Gow , Greg Kroah-Hartman , "Rafael J . Wysocki" , Rob Herring , Frank Rowand , Christian Marangi , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Maxime Ripard Subject: [PATCH v2 10/11] dt-bindings: clk: Add KUnit clk_parent_data test Date: Wed, 15 Mar 2023 11:37:27 -0700 Message-Id: <20230315183729.2376178-11-sboyd@kernel.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230315183729.2376178-1-sboyd@kernel.org> References: <20230315183729.2376178-1-sboyd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760461500551212989?= X-GMAIL-MSGID: =?utf-8?q?1760461500551212989?= Describe a binding for a device that provides and consumes clks in DT so that a KUnit test can register clks based on the device node and test clk_hw_register() with clk_parent_data. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Brendan Higgins Cc: David Gow Signed-off-by: Stephen Boyd --- .../clock/test,clk-kunit-parent-data.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/test,clk-kunit-parent-data.yaml diff --git a/Documentation/devicetree/bindings/clock/test,clk-kunit-parent-data.yaml b/Documentation/devicetree/bindings/clock/test,clk-kunit-parent-data.yaml new file mode 100644 index 000000000000..ece47f05c498 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/test,clk-kunit-parent-data.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/test,clk-kunit-parent-data.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: KUnit clk provider for clk_parent_data unit tests + +maintainers: + - Stephen Boyd + +description: | + A clk provider to test the struct clk_parent_data implementation in the Linux + kernel. + +properties: + compatible: + const: test,clk-kunit-parent-data + + clocks: + items: + - description: Fixed parent + - description: 50 MHz fixed parent + + clock-names: + items: + - const: parent_fwname + - const: "50" + + "#clock-cells": + const: 1 + +required: + - compatible + - "#clock-cells" + +additionalProperties: false + +examples: + - | + clock-controller { + compatible = "test,clk-kunit-parent-data"; + #clock-cells = <1>; + clocks = <&fixed_parent>, <&fixed_50MHz>; + clock-names = "parent_fwname", "50"; + }; +...