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 78B61C7EE32 for ; Thu, 2 Mar 2023 01:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjCBBiw (ORCPT ); Wed, 1 Mar 2023 20:38:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbjCBBin (ORCPT ); Wed, 1 Mar 2023 20:38:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80B9C39CD7; Wed, 1 Mar 2023 17:38:30 -0800 (PST) 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 1500A6153F; Thu, 2 Mar 2023 01:38:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D25C5C433D2; Thu, 2 Mar 2023 01:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677721109; bh=/l+SZdmlEj6k/2KkGkyZGLbEgxbQ4jmIkEvZrUe5VZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m6Rk22s1o6bU0lm2Ynjuyb6MIDTN+qyyMJiFSr1BXExoXWkZqzXLDKkf3hBns0OQD Fu4gxDGugxNn39ZJXiGN7GkSXKt1MXixXjLBeHmxivEWKLYO0ah4cVvjRUfCjitHEW SoDckBVLBvh9sQ/m/4Ge6IM8Q2lmBIP05Fnmx8dPmB/FPFYgaY6Ms85AcXzLcaoRHm 9GcPolkHoK8M0Nva04vWUO28cKR4sK6L2xGZpGvvWmouuf965qHjBXYXeVn2xFFHLo 67whL7JZkCIevfHzUd7nHEJqYyhLjmMB2N5Nuw4ZzC0tgLGjFqEYRVAYNK+kesBJje QOI7UAvT1e9LA== 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" , Richard Weinberger , Anton Ivanov , Johannes Berg , Vincent Whitchurch , Rob Herring , Frank Rowand , Christian Marangi , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-um@lists.infradead.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: [PATCH 7/8] dt-bindings: clk: Add KUnit clk_parent_data test Date: Wed, 1 Mar 2023 17:38:20 -0800 Message-Id: <20230302013822.1808711-8-sboyd@kernel.org> X-Mailer: git-send-email 2.39.2.722.g9855ee24e9-goog In-Reply-To: <20230302013822.1808711-1-sboyd@kernel.org> References: <20230302013822.1808711-1-sboyd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/linux,clk-kunit-parent-data.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/linux,clk-kunit-parent-data.yaml diff --git a/Documentation/devicetree/bindings/clock/linux,clk-kunit-parent-data.yaml b/Documentation/devicetree/bindings/clock/linux,clk-kunit-parent-data.yaml new file mode 100644 index 000000000000..29609e07c115 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/linux,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/linux,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: linux,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 = "linux,clk-kunit-parent-data"; + #clock-cells = <1>; + clocks = <&fixed_parent>, <&fixed_50MHz>; + clock-names = "parent_fwname", "50"; + }; +... -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git