From patchwork Mon Mar 27 22:21:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 75709 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1824217vqo; Mon, 27 Mar 2023 15:23:47 -0700 (PDT) X-Google-Smtp-Source: AKy350b6DXhPp6FjR2WQgrbj14pozOJB7+DtFwyp6JYtSCRI8w66BPotOe3uYdktTkn7eZFFyZY0 X-Received: by 2002:a62:7bcf:0:b0:625:e346:c9e with SMTP id w198-20020a627bcf000000b00625e3460c9emr11594250pfc.6.1679955827221; Mon, 27 Mar 2023 15:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679955827; cv=none; d=google.com; s=arc-20160816; b=00F4oDqNFkUqNrZJ2LK/sSPxpu/F6E/EaSIe/HIfOA2k+anjK6SfiCrlcRc8BSkoAo F2fHuZsoSf0BDowNWhfTV0mU+utvU2NHDJ05bub7/WddzDMQAsEMt/q3yaCCIYg4KU5N bIcEUfCUS7wekl9Ynh3da2U5ITEVW7Dh4Op9R6Rcv97N+98gsDJRIOrw8H6UoVreBAD4 cwKRnwtaimwIDnsEdc8poPnN8ZiPfkZ01PxyA6zOPdB+y2joQAfGPOCrOIfQN3dtmFgN aSJfFbeEkiyxfSfGGBll8Q/V/EV8FXI8ySwDHl8EMScg/Lf3fnm3bvUMLQ9P1yyyWTu3 PpLA== 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=2ymXIoNS8FaLh/Zq3o+DE/EoqbYaJBV8Zd67i8tXjqI=; b=LP94KpaC3tnqo1AsVnfalvFAJwqkHLPjAjzMtoMOU1kXZlHrm7/JFj9EXvJDcMlO4I M/AfYAWIClJnqdqwXj0xDHwu3TGMztRVUPDgOSZzR7BYsyQpyY1nlbAkZPnMNQ0oeFln jfxJvP5J7DEffDo3BRqesDXUbWDhFy6YrvvPEdFyioemq08fs5/iU4T1AZZRAXN8kPdG +IQzQoJccSGoRVFdxXdDlPFLNVc2Np0yTHDYeWPkbRzDxL9kYJm3sKz0hEaIivETg+Gn 4x2FElup7GdhP2267fhhLgaSxk8znFhrJ/WvSencgU+7pRspEblBwSIW9CPkoQHRkspU 2/cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lAyNd0Wo; 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 c17-20020a056a00249100b00623e7faaf20si30267682pfv.192.2023.03.27.15.23.34; Mon, 27 Mar 2023 15:23:47 -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=lAyNd0Wo; 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 S232474AbjC0WWn (ORCPT + 99 others); Mon, 27 Mar 2023 18:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232199AbjC0WWR (ORCPT ); Mon, 27 Mar 2023 18:22:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE82740DB; Mon, 27 Mar 2023 15:22:10 -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 19A95B819A5; Mon, 27 Mar 2023 22:22:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 423F6C4339C; Mon, 27 Mar 2023 22:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679955727; bh=2Hped3KY6Uk2Oc/RHdUAUuvCu9fegBzwhk+dDaq1CSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lAyNd0WoR1WcvvMf+8Wb4XJei0r0zHaAMVOg+st4WmC77BMhUQBudfLNQ9S0JKafa Y7uedc/ieLIIzblkbrx7ktwUd03utg9POvdqQGaX+sa+MeARGeEUtn7wT8oWlcGQvQ V9Mmh1TZrB0phjvNmYyuB+vrGOzjTvm87qFwtB1s7ASHY3lRy6WWow0GsftwGTd3UV RI/MRHDN3W+k6KlaQxsBlwqQ1slq4lSt+iVW22pW1uzTG9AQ2TGdH1MRF6x5tn0Gv5 KhKCL6qL/cpaWmgfqjb9YroXiVcBcpU5tzU6z7cunHwGOp8Yrp5lJ93uoCjbzsnJho Vl9UGj8/5g0qA== 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 v3 10/11] dt-bindings: clk: Add KUnit clk_parent_data test Date: Mon, 27 Mar 2023 15:21:58 -0700 Message-Id: <20230327222159.3509818-11-sboyd@kernel.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230327222159.3509818-1-sboyd@kernel.org> References: <20230327222159.3509818-1-sboyd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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?1761561360995243543?= X-GMAIL-MSGID: =?utf-8?q?1761561360995243543?= 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 Reviewed-by: Rob Herring --- .../bindings/clock/test,clk-parent-data.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/test,clk-parent-data.yaml diff --git a/Documentation/devicetree/bindings/clock/test,clk-parent-data.yaml b/Documentation/devicetree/bindings/clock/test,clk-parent-data.yaml new file mode 100644 index 000000000000..a2f927526405 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/test,clk-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-parent-data.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Fake 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-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-parent-data"; + #clock-cells = <1>; + clocks = <&fixed_parent>, <&fixed_50MHz>; + clock-names = "parent_fwname", "50"; + }; +...