Message ID | 20230315183729.2376178-8-sboyd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp77889wrt; Wed, 15 Mar 2023 12:24:29 -0700 (PDT) X-Google-Smtp-Source: AK7set8JqAmicWVULYS+7z4qYDzMePd1mFth9hN/21weqXKoZm2ixgNcCZmv9RKumgHShXHchv4N X-Received: by 2002:a17:902:f94b:b0:1a0:4cf9:1c6c with SMTP id kx11-20020a170902f94b00b001a04cf91c6cmr510893plb.27.1678908268973; Wed, 15 Mar 2023 12:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678908268; cv=none; d=google.com; s=arc-20160816; b=qIb9g6g2vhCeRyZnHs0NLbHPHd7voxc4b4vI7sokZKDgNz7TWyitV/rBuzSXgQ0GlE E7sdPsA75E4bpIXESTd9SRGLeuSJO6lDwLgyd6DBXWQgi+zbl3rdbHIcYZeNpsyK2CjP nmNuDUYY/eqaGoF0q1G6LiSNAz+3BVBU1DubaFzr8GhdRuPpOb9w+xzxrecPSJzLyFuE pjnRQ4txiV0yXIjCPG8ZIgjmgbIK+xGLfUXBfmtiaw2y3Mjg54d/EpA3OMi9vBqrVVFe E/DGEtXFVWRpZA9AuSYOzItW14ufya/VOu3MdHiJOmeot+cYr5RrDw7nWOyaVpnHu6/o bUtg== 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=pPyJfvQCHGpl/7XmGPMWUwRsYu1CHEj4DMvmx8wIpdw=; b=1F3e4DG78zYzMqsQJ1SFsvHs3rLgKGHxOWn0vkMDahbtHlIQehfbfUDRXm81waxRNW qomwiFhrMAkE/Gn8LkFHNzhE8ehwEW3baCE7cVWMXPq72YIPAPkiUbtekEp04eZ+sTEe In1sduia6/M1EjySAEw/x/GhXkUcbpmgzAims6w1qwPo3coRCVLPFPp0tyvOZ1qQggl4 5udp4GCiYlzkK5+EGpJnU7hgyvYJdf2FVznyiqWIlOjcMk9N5pvJsnc9MYE7swTH9Uh/ z3s0ePbPumPaczfqssvRmtUhVK2cwHLc+bQzbQoL6KdJSU1issUKd6g39qq5csb3yS+l /VKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nG9+XV+g; 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 jy4-20020a17090342c400b0019ea3ee6f0bsi5584600plb.492.2023.03.15.12.24.14; Wed, 15 Mar 2023 12:24:28 -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=nG9+XV+g; 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 S232506AbjCOSno (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Wed, 15 Mar 2023 14:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232216AbjCOSn2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 14:43:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A02213D5D; Wed, 15 Mar 2023 11:43:06 -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 ams.source.kernel.org (Postfix) with ESMTPS id 81248B81EFE; Wed, 15 Mar 2023 18:37:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF6CEC433A4; Wed, 15 Mar 2023 18:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678905455; bh=hFEwMRM75Gh9vFWXQy+p8pjvVTIDQeLRyGLEW21bVp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nG9+XV+g0cLGaGP512GRzzmUD+Atp4ZSqggcxnqeJIyykyfRIVDK1hYgVdUir5f79 NSqxZFkpvAob1R2OA2Ed1raIYn8OY63gCmkgfzO9gHlkoHZFUSmtWm4D10TzTKk3oC 8wCUR2IXTo79e87UgiFCcmVx09kaVlph5Nb1jpBB5TNUv+HyUnggbmSSY94UBJ7eN1 +zwJtVHa0/lELTnmaKwbN0f4NDum7qRWSSPF+GXMWxUcu19LNSg1iBRGMnJ32ot3Z0 9L5dVTk6T9RtOy/n51FsYWLfCI9Ex05Z0U7Ah4IwnXWFWZl1VMC46V6xF/hsicRVT6 1DjOlGODFSmbg== From: Stephen Boyd <sboyd@kernel.org> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, Brendan Higgins <brendan.higgins@linux.dev>, David Gow <davidgow@google.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J . Wysocki" <rafael@kernel.org>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Christian Marangi <ansuelsmth@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, devicetree@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Maxime Ripard <maxime@cerno.tech> Subject: [PATCH v2 07/11] dt-bindings: kunit: Add fixed rate clk consumer test Date: Wed, 15 Mar 2023 11:37:24 -0700 Message-Id: <20230315183729.2376178-8-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 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760462917017841984?= X-GMAIL-MSGID: =?utf-8?q?1760462917017841984?= |
Series |
clk: Add kunit tests for fixed rate and parent data
|
|
Commit Message
Stephen Boyd
March 15, 2023, 6:37 p.m. UTC
Describe a binding for a device that consumes a fixed rate clk in DT so
that a KUnit test can get the clk registered by of_fixed_clk_setup() and
test that it is setup properly.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
.../kunit/test,clk-kunit-fixed-rate.yaml | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml
Comments
On Wed, Mar 15, 2023 at 11:37:24AM -0700, Stephen Boyd wrote: > Describe a binding for a device that consumes a fixed rate clk in DT so > that a KUnit test can get the clk registered by of_fixed_clk_setup() and > test that it is setup properly. > > Cc: Rob Herring <robh+dt@kernel.org> > Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> > Cc: Brendan Higgins <brendan.higgins@linux.dev> > Cc: David Gow <davidgow@google.com> > Signed-off-by: Stephen Boyd <sboyd@kernel.org> > --- > .../kunit/test,clk-kunit-fixed-rate.yaml | 35 +++++++++++++++++++ Some stuff in test and some in kunit? I prefer 'test'. > 1 file changed, 35 insertions(+) > create mode 100644 Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml > > diff --git a/Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml b/Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml > new file mode 100644 > index 000000000000..58d7826d9c14 > --- /dev/null > +++ b/Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml > @@ -0,0 +1,35 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/kunit/test,clk-kunit-fixed-rate.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: KUnit clk fixed rate test clk consumer > + > +maintainers: > + - Stephen Boyd <sboyd@kernel.org> > + > +description: | Drop '|' > + A clk consumer of a fixed rate clk used to test the fixed rate clk > + implementation in the Linux kernel. > + > +properties: > + compatible: > + const: test,clk-kunit-fixed-rate I tend to think we should drop 'kunit' from these bindings. You could use this for different test frameworks. > + > + clocks: > + maxItems: 1 > + > +required: > + - compatible > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + clock-consumer { > + compatible = "test,clk-kunit-fixed-rate"; > + clocks = <&fixed_clk>; > + }; > +... > -- > https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ > https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git >
diff --git a/Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml b/Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml new file mode 100644 index 000000000000..58d7826d9c14 --- /dev/null +++ b/Documentation/devicetree/bindings/kunit/test,clk-kunit-fixed-rate.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/kunit/test,clk-kunit-fixed-rate.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: KUnit clk fixed rate test clk consumer + +maintainers: + - Stephen Boyd <sboyd@kernel.org> + +description: | + A clk consumer of a fixed rate clk used to test the fixed rate clk + implementation in the Linux kernel. + +properties: + compatible: + const: test,clk-kunit-fixed-rate + + clocks: + maxItems: 1 + +required: + - compatible + - clocks + +additionalProperties: false + +examples: + - | + clock-consumer { + compatible = "test,clk-kunit-fixed-rate"; + clocks = <&fixed_clk>; + }; +...