From: Alex Elder <elder@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Taniya Das <quic_tdas@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v2 5/8] clk: qcom: rpmh: rename ARC clock data
Date: Thu, 1 Dec 2022 13:21:07 -0600 [thread overview]
Message-ID: <b9ecc4bf-67c6-b7bf-6a5b-5cce6a86c3da@linaro.org> (raw)
In-Reply-To: <20221130131001.20912-6-dmitry.baryshkov@linaro.org>
On 11/30/22 7:09 AM, Dmitry Baryshkov wrote:
> RPMH ARC clocks are frequently shared between several platfoms. It makes
> little sense to encode the SoC name into the clock name, if the same
> clock is used for other SoCs.
>
> Rework the ARC clocks defintions to remove the SoC name. Keep the
s/clocks/clock/
> userspace-visible clock name, but encode the divider into the variable
> name. This also make it obvious which divider is used by the platform,
s/make/makes/
> making the code less error-prone.
You could do this as multiple patches: one to distinguish the
clock symbol name from the user space name; one for formulating
the divider symbol name; and one for eliminating the platform.
I think if you do the first one, you could make that change to
all clock types at once, cleanly.
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org > ---
> drivers/clk/qcom/clk-rpmh.c | 86 ++++++++++++++++++-------------------
> 1 file changed, 43 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index 5044f9fa156d..bd6cb07b6154 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
> @@ -70,15 +70,15 @@ struct clk_rpmh_desc {
>
> static DEFINE_MUTEX(rpmh_clk_lock);
>
> -#define __DEFINE_CLK_RPMH(_platform, _name, _res_name, \
> +#define __DEFINE_CLK_RPMH(_platform, _name, _cname, _res_name, \
> _res_en_offset, _res_on, _div) \
Maybe _clk_name instead of _cname?
-Alex
> - static struct clk_rpmh _platform##_##_name##_ao; \
> - static struct clk_rpmh _platform##_##_name = { \
> + static struct clk_rpmh _platform##_##_cname##_ao; \
> + static struct clk_rpmh _platform##_##_cname = { \
> .res_name = _res_name, \
> .res_addr = _res_en_offset, \
> .res_on_val = _res_on, \
> .div = _div, \
> - .peer = &_platform##_##_name##_ao, \
> + .peer = &_platform##_##_cname##_ao, \
> .valid_state_mask = (BIT(RPMH_WAKE_ONLY_STATE) | \
> BIT(RPMH_ACTIVE_ONLY_STATE) | \
> BIT(RPMH_SLEEP_STATE)), \
. . .
next prev parent reply other threads:[~2022-12-01 19:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 13:09 [PATCH v2 0/8] clk: qcom: rpm/rpmh: drop platform names Dmitry Baryshkov
2022-11-30 13:09 ` [PATCH v2 1/8] clk: qcom: rpmh: group clock definitions together Dmitry Baryshkov
2022-11-30 13:09 ` [PATCH v2 2/8] clk: qcom: rpmh: reuse common duplicate clocks Dmitry Baryshkov
2022-11-30 13:09 ` [PATCH v2 3/8] clk: qcom: rpmh: drop all _ao names Dmitry Baryshkov
2022-11-30 13:22 ` Konrad Dybcio
2022-12-01 19:20 ` Alex Elder
2022-12-01 20:37 ` Abel Vesa
2022-11-30 13:09 ` [PATCH v2 4/8] clk: qcom: rpmh: remove platform names from BCM clocks Dmitry Baryshkov
2022-11-30 13:23 ` Konrad Dybcio
2022-12-01 19:20 ` Alex Elder
2022-12-01 23:22 ` Bjorn Andersson
2022-12-02 6:39 ` Dmitry Baryshkov
2022-11-30 13:09 ` [PATCH v2 5/8] clk: qcom: rpmh: rename ARC clock data Dmitry Baryshkov
2022-12-01 19:21 ` Alex Elder [this message]
2022-11-30 13:09 ` [PATCH v2 6/8] clk: qcom: rpmh: rename VRM " Dmitry Baryshkov
2022-11-30 13:30 ` Konrad Dybcio
2022-12-01 19:21 ` Alex Elder
2022-11-30 13:10 ` [PATCH v2 7/8] clk: qcom: rpmh: remove the last traces of the platform usage Dmitry Baryshkov
2022-11-30 13:26 ` Konrad Dybcio
2022-12-01 19:21 ` Alex Elder
2022-11-30 13:10 ` [PATCH v2 8/8] clk: qcom: rpm: drop the platform from clock definitions Dmitry Baryshkov
2022-11-30 13:28 ` Konrad Dybcio
2022-12-01 19:21 ` Alex Elder
2022-12-01 20:24 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9ecc4bf-67c6-b7bf-6a5b-5cce6a86c3da@linaro.org \
--to=elder@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_tdas@quicinc.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox