[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220719131803.v7bvnutput6dnott@SoMainline.org>
Date: Tue, 19 Jul 2022 15:18:03 +0200
From: Marijn Suijten <marijn.suijten@...ainline.org>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v5 3/3] clk: qcom: lcc-ipq806x: convert to parent data
On 2022-07-08 02:03:38, Christian Marangi wrote:
> Convert lcc-ipq806x driver to parent_data API.
>
> Signed-off-by: Christian Marangi <ansuelsmth@...il.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 ..]
Powered by blists - more mailing lists