Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4463190imw; Tue, 19 Jul 2022 07:06:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vh7glbo7z4Ll+7I/mBOnuNmGGBgWpyoAFHdfT4SwZxCLTS/8njaICS3WtG6KB3kkfvqI/n X-Received: by 2002:a67:1981:0:b0:354:5d34:6336 with SMTP id 123-20020a671981000000b003545d346336mr12206769vsz.75.1658239591721; Tue, 19 Jul 2022 07:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658239591; cv=none; d=google.com; s=arc-20160816; b=WM7VR1IYBS932NsSVx/IH8cOjbu+RsSv11aq6Aa0353RlAnLiFtqETu4I+ADdvQRsI l696HlYO3GJIGhewcMhicCbm1+jRt48iAnM7HMWNd10Y/8W5ldLZZiwsv2jUIgYVJbqG wuXagrJTyFV2l4Ha49GvOeHQS/ooDaFhZ03wlpMdNMSQAKnKuamiZlWadjj0phDnbJ/U 8ntnXJ7CpQg+b1VaL2xuJH4KaNG5drvgSJK2WTjixuUepbjC6qg2D/QqYC3jSMBJeiO6 6Uyu20N279uliYc8IUo/zSRtVD+jk6qhCEe+SeZQr2xShzP28fLAdLuvgDmQ3q5Diwfq P81g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=N8RjXOirRPKwO3SJGx8BHXnOUUJCJdqzzWwVWU58ivg=; b=dkxKcY0jQNdbiZOB+gRyIMch+gf2M21jxME5VvAM2EWLLs/BFKq9cftABnWiFjz4fu GcpjOieYaE0VD53jBdPlCqHaaQ0Qp2lVu5kdOLwgMf9Vy06mJwLqujGhaLV6JhLhkA0c 27woHb+bkbmt/rz1EMtu6qmqEnE7EY01BTvvpnq9/KSfdD8inEfX0c3U3GdynBqyLwVV hyzcrbDee9ego+bok0OnCWYoK2JqPPiWUS/Uz/RdqYU/ILb7PUSPKAZuGNw8DDRKYesv CSp/V1+3rgcy5cIkefrPu58JsIGtygbzc3OHDjIwWxGxxSCK6qG+W0AhDPerGC2It+dw /YuA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a39-20020ab03ca7000000b003840e0f7e8esi1108718uax.105.2022.07.19.07.06.14; Tue, 19 Jul 2022 07:06:31 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234007AbiGSOFS (ORCPT + 99 others); Tue, 19 Jul 2022 10:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237942AbiGSOEx (ORCPT ); Tue, 19 Jul 2022 10:04:53 -0400 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [5.144.164.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBAED52DD9; Tue, 19 Jul 2022 06:18:12 -0700 (PDT) Received: from SoMainline.org (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 4A6661FEF7; Tue, 19 Jul 2022 15:18:10 +0200 (CEST) Date: Tue, 19 Jul 2022 15:18:03 +0200 From: Marijn Suijten To: Christian Marangi Cc: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , 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 Message-ID: <20220719131803.v7bvnutput6dnott@SoMainline.org> References: <20220708000338.26572-1-ansuelsmth@gmail.com> <20220708000338.26572-3-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220708000338.26572-3-ansuelsmth@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 On 2022-07-08 02:03:38, Christian Marangi wrote: > Convert lcc-ipq806x driver to parent_data API. > > Signed-off-by: Christian Marangi > --- > 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 ..]