Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1643038rwl; Mon, 26 Dec 2022 02:33:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXvvUTwu29179ndu1NQX6VKra46H3jVt15NT4k9EAsLfEX0Zn4HLY6VUlJakPEkzEDdzWr0N X-Received: by 2002:a17:90a:2d85:b0:223:ffd8:33d2 with SMTP id p5-20020a17090a2d8500b00223ffd833d2mr20533814pjd.48.1672050813903; Mon, 26 Dec 2022 02:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672050813; cv=none; d=google.com; s=arc-20160816; b=lB+1wIQoGe84IVfR6txCyapQirJVyexMA3HmsufmmACBp5bRnrDwIEXKCHN/43RFgw SKpQzyg5tb/+T0TRX2fKg0enJ4ICOMc2/r0lFneCEi2GTMdGG6NeWiKckLZBfy5goz4c SnAI5gDHLAv6EJ9XbAdjl7x6VCd6AhJJDNrK2+GUaTfNFi+iciPeowNhLXaSjTGynXFH EwZ2EeGNPxAaTCcFX/n/lsVxo3g4AIEqPeXLt9tWeY2WRY1lu9uFtCcHoNS2Yg72cQGK 8b9WGDxt49dJ0VIJElyWvQd5lge0ljIEWNwlWOXedO/MUYMqmh7A1MMZni8DpKlgrnC8 wIgQ== 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=EhrgxjMr+d+cFtBbp3yJIKjSN0BrfSAFflBEkgd14AM=; b=ixj6jE3H1soVkhJrOymOqHpSQ5HYpByYBqM4aopeMsp/mg0j3lI+u6zDXaxeaoRYHb grYl8Z1D/kG91PwHqPDzcMLaiB9Gy2gE+KuTcPvY9Df0NQ3UYmQq6Ee7lAbsrn1B6C8Y ffA/5c0cEyFSY3DjbzXxM22y/BjlITtmmqk6k2Y8JEdvJcJYEW719c+jnsFDryWJxO/e zVlehm84JE45Fz4lXyXSyriyeeUn67TRUv9Wkxx+nPALWXTEmTzcSn3AguOZu70ytUUM ai7Sjxr+7JGyxUl8jXKibh5wWgymtA/uJBKcbFaXygkNAx7VrZLixKnJcdrYEx8RYirg 8H7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ioqaHRLu; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw7-20020a17090b4d0700b0021a04add441si16245536pjb.104.2022.12.26.02.33.25; Mon, 26 Dec 2022 02:33:33 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=ioqaHRLu; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbiLZJ6M (ORCPT + 66 others); Mon, 26 Dec 2022 04:58:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiLZJ6F (ORCPT ); Mon, 26 Dec 2022 04:58:05 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417D5267F; Mon, 26 Dec 2022 01:58:04 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BQ9vo1x078249; Mon, 26 Dec 2022 03:57:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1672048670; bh=EhrgxjMr+d+cFtBbp3yJIKjSN0BrfSAFflBEkgd14AM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ioqaHRLumQfn/Offg7Xgn+W2uwYO0hj9QnivKsZ6QFOM01hDCaEKMd07+XHMx4U80 D+2u1yaROj7PfOHgNHD+33Za7ghzqg2Rx87VW8Zwfi4h9N5383AS2jpyeZ/cRvhOFo qkhUvXEJ+/6K7VxCUqZBXgyLiF2lOA55+2Js0BAo= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BQ9voZV126102 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Dec 2022 03:57:50 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 26 Dec 2022 03:57:49 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 26 Dec 2022 03:57:49 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BQ9vmbc088703; Mon, 26 Dec 2022 03:57:49 -0600 From: Aradhya Bhatia To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski CC: Tomi Valkeinen , Samuel Holland , Maxime Ripard , Linux Clock List , Devicetree List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Jai Luthra , Aradhya Bhatia Subject: [PATCH 2/2] clk: fixed-factor: Re-introduce support for clocks to set parent clock-rate Date: Mon, 26 Dec 2022 15:27:45 +0530 Message-ID: <20221226095745.19757-3-a-bhatia1@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221226095745.19757-1-a-bhatia1@ti.com> References: <20221226095745.19757-1-a-bhatia1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 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 Add support for the clock "ti,k3-am62-oldi-clk-div". Also add support for this clock to propagate the clock set request to its parent clock, by setting the CLK_SET_RATE_PARENT flag. Signed-off-by: Aradhya Bhatia --- drivers/clk/clk-fixed-factor.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index f734e34735a9..1a78e2d870dd 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -245,10 +245,16 @@ struct clk_hw *devm_clk_hw_register_fixed_factor(struct device *dev, EXPORT_SYMBOL_GPL(devm_clk_hw_register_fixed_factor); #ifdef CONFIG_OF +static const struct of_device_id set_rate_parent_matches[] = { + { .compatible = "ti,k3-am62-oldi-clk-div" }, + { /* Sentinel */ }, +}; + static struct clk_hw *_of_fixed_factor_clk_setup(struct device_node *node) { struct clk_hw *hw; const char *clk_name = node->name; + unsigned long flags = 0; u32 div, mult; int ret; @@ -264,10 +270,13 @@ static struct clk_hw *_of_fixed_factor_clk_setup(struct device_node *node) return ERR_PTR(-EIO); } + if (of_match_node(set_rate_parent_matches, node)) + flags |= CLK_SET_RATE_PARENT; + of_property_read_string(node, "clock-output-names", &clk_name); hw = __clk_hw_register_fixed_factor(NULL, node, clk_name, NULL, NULL, 0, - 0, mult, div, false); + flags, mult, div, false); if (IS_ERR(hw)) { /* * Clear OF_POPULATED flag so that clock registration can be -- 2.39.0