From patchwork Tue Feb 28 13:44:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 62489 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3021276wrd; Tue, 28 Feb 2023 05:46:46 -0800 (PST) X-Google-Smtp-Source: AK7set+2EHTBiXQ4aiRHYhIkxcjyneLi1A2xON++J+T+gOxAkyndzzNMDk3ilhMWzDkl5k4RGlWu X-Received: by 2002:a17:906:594d:b0:8e7:916f:193d with SMTP id g13-20020a170906594d00b008e7916f193dmr2980024ejr.28.1677592006242; Tue, 28 Feb 2023 05:46:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677592006; cv=none; d=google.com; s=arc-20160816; b=cBD/PlKQBPmX6Buez9Dtxp9YcLxA4nwov6Tj4QMLroaYF3hGm5lgbv2YyFr5xjGaQl b5DyJZLYzSW2ebmQvp56c++8Zy66B/pRaPHgz/7WT5QPFCecXRc3PccdVjIE8EIaGPw0 r/SZ0NifzxvmgLU7q+bZeBpO4cs6VZZtP7kt0he9UgAsWwOEmY5+RkniwoycvX0n4Hwo dIFJVVrtLHFC/azDHfpXUXtKa+P6NLJ44oGBJhEhK2M9NlA+xfgRAzyeQtws2cUmjE8H oGdqEgaNNdIwjs1OIb4AplRXTKRuwWt40vwGgmsjFGATctRTRRsR8738dGS0zq3ltpHj NtjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=oMiTxpwM33fLoo3zljfiICDBPzjHi5z55E4EhRlk6DU=; b=U/cVx1lFHetr8rVvF5DuHaNTcn9SrKDJttiFHupfHktsAYSv1cEk5Gpt7S+Z1/cSY7 rWXIcSszDHG2eykcpxTHSdd2pmM+kSqJ3frxxZokdPXmvVzJV83ZkxrqDEkdjkCycC5z vqRbTFHIwItVlD6nEjrraSyrLoVClko8B52PHPGAXA2QMlINsINPo+L1rGpGwkxThGet gtY0KPvukcpSDJL1+Agd5EajxYfAoMbj/yBuMZOLv3H9n4JQINQyHaM/gnN/L9eynKSg gi/xqf5zVRwLoeC+RP1/1h/9vZmW3I41iyfU1N6Ai38EHOC/kvx7FaM02fLZanfFF+43 Jkcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rv2uVtNF; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a170906261500b008ce48e03890si12754043ejc.320.2023.02.28.05.46.22; Tue, 28 Feb 2023 05:46:46 -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=@linaro.org header.s=google header.b=Rv2uVtNF; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjB1Nor (ORCPT + 99 others); Tue, 28 Feb 2023 08:44:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjB1Nod (ORCPT ); Tue, 28 Feb 2023 08:44:33 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 180932F7BE for ; Tue, 28 Feb 2023 05:44:29 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id n2so13203145lfb.12 for ; Tue, 28 Feb 2023 05:44:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677591868; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oMiTxpwM33fLoo3zljfiICDBPzjHi5z55E4EhRlk6DU=; b=Rv2uVtNFZx1qdQLUfaqkrs4kShtmKGiOiXAwhtza3pciKtGD1BmHlxhcKTQLlWBo76 EiIDVlPazD7LtqyfRjeGdQ/bn9Z/yJMvwzkyYg1qdKM+9s/RfM6XQX85NUyr4jRXH3k6 rH3puDHljW8QIW6Ll3tvMIo5u7/NpAPvxAjWDhl0uekLoC31eRWAMpez4LHLO5S2TH8s c6Dc82nPa1OnNk9tWRo7v/8v14Upuehds3F1kNehO9R/yrA0jGVOm/VOpk4dgVfRh3D3 jkuNaGAfdi2564B3h5L0PHeEljHjbQr6gGzvxiXFsqUM7ymdjj1xx8YgFohaxkb/eZMj 5HQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677591868; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oMiTxpwM33fLoo3zljfiICDBPzjHi5z55E4EhRlk6DU=; b=B3ZuI+Do0a2nI8emwsTwJIsvgMd7qloNcZ29czjxppnoVPk7gUKygXqM4pJVgvmiix rUu09rQ0YL4YgrUgBmyTT72LD5SLgbjdT2wdUjA9HFMPGFS3LvXfq1nKXEElDUQPFCgH CjTPT4m3eBbhT/TqHaSlb8sn/g1wFaR/grmXm3plX5Pa6V/yukFfxbz3zFxh8K7Ygloa w8Z4CFwfQBtnOGxdJ2TQojLq7w02yGG8ms1x6Q6Q4qmAXb5MYSGl0hEVsWHI88+g4qPO /0Exi+I4+Zq2kNbu1GJgPcIfz8B3KqHzqeDQV4uTQiq8EwtnXoiA52Y0W4DS6a+vThSi CJiw== X-Gm-Message-State: AO0yUKWUQhFj1Vs+Qr9yXuUbWGDCe1KpqU5mPUTADOwhr+5a6uaYz9uO lmTTEjidU1ETlKW9meqLtFSuBA== X-Received: by 2002:ac2:5ddc:0:b0:4b6:f51e:b8b6 with SMTP id x28-20020ac25ddc000000b004b6f51eb8b6mr696561lfq.56.1677591868306; Tue, 28 Feb 2023 05:44:28 -0800 (PST) Received: from [192.168.1.101] (abym99.neoplus.adsl.tpnet.pl. [83.9.32.99]) by smtp.gmail.com with ESMTPSA id j20-20020a2e3c14000000b00295a583a20bsm1203975lja.74.2023.02.28.05.44.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 05:44:27 -0800 (PST) From: Konrad Dybcio Date: Tue, 28 Feb 2023 14:44:02 +0100 Subject: [PATCH v6 5/9] interconnect: qcom: rpm: Rename icc provider num_clocks to num_bus_clocks MIME-Version: 1.0 Message-Id: <20230228-topic-qos-v6-5-3c37a349656f@linaro.org> References: <20230228-topic-qos-v6-0-3c37a349656f@linaro.org> In-Reply-To: <20230228-topic-qos-v6-0-3c37a349656f@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Dmitry Baryshkov Cc: Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677591861; l=3438; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=7FqLtMqh4mIUzsD3NmcdtRjn6IINUaYjtwsFkF9J5aM=; b=7Ylg7yC4+IMm3JNEtAClcZSbAikiiS+uVO09S/eygmI37u8ZoedL4Gbyme9unThk4epjLNNvExw5 ducLfHzXCHrV9ONGaxyyslt7FUW1aPnAFLiTTY5neV6Dp//SuBRA X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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?1759082715739487349?= X-GMAIL-MSGID: =?utf-8?q?1759082715739487349?= In preparation for handling non-scaling clocks that we still have to enable, rename num_clocks to more descriptive num_bus_clocks. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 14 +++++++------- drivers/interconnect/qcom/icc-rpm.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index 7a54fe4ccadd..f78c13e6c5ce 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -380,7 +380,7 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst) return ret; } - for (i = 0; i < qp->num_clks; i++) { + for (i = 0; i < qp->num_bus_clks; i++) { /* * Use WAKE bucket for active clock, otherwise, use SLEEP bucket * for other clocks. If a platform doesn't set interconnect @@ -465,7 +465,7 @@ int qnoc_probe(struct platform_device *pdev) for (i = 0; i < cd_num; i++) qp->bus_clks[i].id = cds[i]; - qp->num_clks = cd_num; + qp->num_bus_clks = cd_num; qp->type = desc->type; qp->qos_offset = desc->qos_offset; @@ -495,11 +495,11 @@ int qnoc_probe(struct platform_device *pdev) } regmap_done: - ret = devm_clk_bulk_get_optional(dev, qp->num_clks, qp->bus_clks); + ret = devm_clk_bulk_get_optional(dev, qp->num_bus_clks, qp->bus_clks); if (ret) return ret; - ret = clk_bulk_prepare_enable(qp->num_clks, qp->bus_clks); + ret = clk_bulk_prepare_enable(qp->num_bus_clks, qp->bus_clks); if (ret) return ret; @@ -521,7 +521,7 @@ int qnoc_probe(struct platform_device *pdev) ret = icc_provider_add(provider); if (ret) { dev_err(dev, "error adding interconnect provider: %d\n", ret); - clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks); + clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); return ret; } @@ -554,7 +554,7 @@ int qnoc_probe(struct platform_device *pdev) return 0; err: icc_nodes_remove(provider); - clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks); + clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); icc_provider_del(provider); return ret; @@ -566,7 +566,7 @@ int qnoc_remove(struct platform_device *pdev) struct qcom_icc_provider *qp = platform_get_drvdata(pdev); icc_nodes_remove(&qp->provider); - clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks); + clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); icc_provider_del(&qp->provider); return 0; diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index d6b4c56bf02c..d4401f35f6d2 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -23,7 +23,7 @@ enum qcom_icc_type { /** * struct qcom_icc_provider - Qualcomm specific interconnect provider * @provider: generic interconnect provider - * @num_clks: the total number of clk_bulk_data entries + * @num_bus_clks: the total number of bus_clks clk_bulk_data entries * @type: the ICC provider type * @regmap: regmap for QoS registers read/write access * @qos_offset: offset to QoS registers @@ -32,7 +32,7 @@ enum qcom_icc_type { */ struct qcom_icc_provider { struct icc_provider provider; - int num_clks; + int num_bus_clks; enum qcom_icc_type type; struct regmap *regmap; unsigned int qos_offset;