From: Marijn Suijten <marijn.suijten@somainline.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 3/3] clk: qcom: lcc-ipq806x: convert to parent data
Date: Tue, 19 Jul 2022 15:18:03 +0200 [thread overview]
Message-ID: <20220719131803.v7bvnutput6dnott@SoMainline.org> (raw)
In-Reply-To: <20220708000338.26572-3-ansuelsmth@gmail.com>
On 2022-07-08 02:03:38, Christian Marangi wrote:
> Convert lcc-ipq806x driver to parent_data API.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> v5:
> - Fix the same compilation error (don't know what the hell happen
> to my buildroot)
> v4:
> - Fix compilation error
> v3:
> - Inline pxo pll4 parent
> - Change .name from pxo to pxo_board
>
> drivers/clk/qcom/lcc-ipq806x.c | 77 ++++++++++++++++++----------------
> 1 file changed, 42 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/clk/qcom/lcc-ipq806x.c b/drivers/clk/qcom/lcc-ipq806x.c
> index ba90bebba597..72d6aea5be30 100644
> --- a/drivers/clk/qcom/lcc-ipq806x.c
> +++ b/drivers/clk/qcom/lcc-ipq806x.c
> @@ -34,7 +34,9 @@ static struct clk_pll pll4 = {
> .status_bit = 16,
> .clkr.hw.init = &(struct clk_init_data){
> .name = "pll4",
> - .parent_names = (const char *[]){ "pxo" },
> + .parent_data = &(const struct clk_parent_data) {
> + .fw_name = "pxo", .name = "pxo_board",
> + },
> .num_parents = 1,
> .ops = &clk_pll_ops,
> },
> @@ -64,9 +66,9 @@ static const struct parent_map lcc_pxo_pll4_map[] = {
> { P_PLL4, 2 }
> };
>
> -static const char * const lcc_pxo_pll4[] = {
> - "pxo",
> - "pll4_vote",
> +static const struct clk_parent_data lcc_pxo_pll4[] = {
> + { .fw_name = "pxo", .name = "pxo" },
> + { .fw_name = "pll4_vote", .name = "pll4_vote" },
> };
>
> static struct freq_tbl clk_tbl_aif_mi2s[] = {
> @@ -131,18 +133,14 @@ static struct clk_rcg mi2s_osr_src = {
> .enable_mask = BIT(9),
> .hw.init = &(struct clk_init_data){
> .name = "mi2s_osr_src",
> - .parent_names = lcc_pxo_pll4,
> - .num_parents = 2,
> + .parent_data = lcc_pxo_pll4,
> + .num_parents = ARRAY_SIZE(lcc_pxo_pll4),
We've typically done the ARRAY_SIZE conversion in a separate patch, as
they're not related to "parent_data API", strictly speaking.
(Except in the lcc_mi2s_bit_div_codec_clk etc case below, which was
written inline previously).
- Marijn
[.. snip ..]
prev parent reply other threads:[~2022-07-19 14:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 0:03 [PATCH v5 1/3] dt-bindings: clock: add pcm reset for ipq806x lcc Christian Marangi
2022-07-08 0:03 ` [PATCH v5 2/3] clk: qcom: lcc-ipq806x: add reset definition Christian Marangi
2022-07-08 0:03 ` [PATCH v5 3/3] clk: qcom: lcc-ipq806x: convert to parent data Christian Marangi
2022-07-19 4:42 ` Bjorn Andersson
2022-07-19 12:23 ` Christian Marangi
2022-07-19 15:23 ` Dmitry Baryshkov
2022-07-19 21:41 ` Bjorn Andersson
2022-07-19 13:18 ` Marijn Suijten [this message]
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=20220719131803.v7bvnutput6dnott@SoMainline.org \
--to=marijn.suijten@somainline.org \
--cc=agross@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--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