Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2487453imw; Wed, 6 Jul 2022 06:49:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRUkeJ5ceF4eJEmdSE6K/UsMw4cZEtwTTA91Wn7LRr43QjfgJaRDJb4S4Apt3Rw/HSv7R6 X-Received: by 2002:a05:6402:5cb:b0:434:eb48:754f with SMTP id n11-20020a05640205cb00b00434eb48754fmr54620199edx.421.1657115398882; Wed, 06 Jul 2022 06:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657115398; cv=none; d=google.com; s=arc-20160816; b=K/xprh2zdwbuoC+nbn7x+jaKIfHs/pY/uXOlmnbO0NLBD1A3dgBBE+FywHKmd9GLST nMz69Z1608w9OohfDr7YDA0pBD8vCLjyAiOsgMgeK4UKKcx9IK/e4J4zNd0LJl2qp5oG K4j53pa90BKwmnLn6odklK+akvdmdZrzuGkkMgYJdzV9DKMBzVKay1OzFMQPacYMUr24 SZCmWChEnRvmsGuJrqnSbSM5ELOadAglH1Eui4rrn3bBzCwd9gbO2HfK5jShUGogNVwi CS2dGmTccEfceqCNaOiM1slltzgcE1ru2zHGmHQE1YubdTxY4N89vdVaBvg2J3rL/5lS nbCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=T5zi+PQtToZsdQcdAg4iabLYlOruBcdFDNvm9wgteFk=; b=c/tpSy3JaH+MeOr+C6cbvC5rt1291BN1Yddk43KYyv0Rpa1y5x5vSi3py5YsmE5EVV uccKYyY+yaBB60AjRcpY3V5/x1D1ujWZgFmARp72hGKvl9feitJwbwi39upipFAag7YJ OY+USQxDH87WTkTDJ9NV45KQPJFeiO9MrLQBz3JeSP1Q56MSfrI9syQQt3Zqx+72prLZ JemJ7dIO6dVLkVrDlEM6wnOS/4i4H2GrG4eT/Y2FkNPu/o9e3E21dZa2v5GxDo9LP/9a sTYigxbdDixVC2KS7Ta//+lzTf2vF0Gby4Q2jUPpVNmyoJ1Vtudr9GTmu703AZN5RAr9 okrw== 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 a27-20020a1709063a5b00b006ff05cc7140si12316234ejf.255.2022.07.06.06.49.33; Wed, 06 Jul 2022 06:49:58 -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 S232155AbiGFN06 (ORCPT + 99 others); Wed, 6 Jul 2022 09:26:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232126AbiGFN05 (ORCPT ); Wed, 6 Jul 2022 09:26:57 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [IPv6:2001:4b7a:2000:18::168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DBD61CB10; Wed, 6 Jul 2022 06:26:56 -0700 (PDT) Received: from [192.168.1.101] (abxi46.neoplus.adsl.tpnet.pl [83.9.2.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 33D5C3F767; Wed, 6 Jul 2022 15:26:54 +0200 (CEST) Message-ID: <92d41b82-97ab-723d-4191-1fcaca17fb76@somainline.org> Date: Wed, 6 Jul 2022 15:26:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 3/5] clk: qcom: clk-rpm: convert to parent_data API Content-Language: en-US To: Christian Marangi , Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220705202837.667-1-ansuelsmth@gmail.com> <20220705202837.667-4-ansuelsmth@gmail.com> From: Konrad Dybcio In-Reply-To: <20220705202837.667-4-ansuelsmth@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 5.07.2022 22:28, Christian Marangi wrote: > Convert clk-rpm driver to parent_data API and change parent names to cxo > and pxo instead of the board variant as pxo_board is an ancient name and > pxo should be used instead. > > Signed-off-by: Christian Marangi > --- > drivers/clk/qcom/clk-rpm.c | 24 ++++++++++++++++-------- > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c > index a18811c38018..d45a8b0fc97c 100644 > --- a/drivers/clk/qcom/clk-rpm.c > +++ b/drivers/clk/qcom/clk-rpm.c > @@ -23,6 +23,14 @@ > #define QCOM_RPM_SCALING_ENABLE_ID 0x2 > #define QCOM_RPM_XO_MODE_ON 0x2 > > +static const struct clk_parent_data gcc_pxo[] = { > + { .fw_name = "pxo", .name = "pxo" }, The .name lookup should include _board, as the old DTs expect that. If I understand correctly though, you need to preserve both pxo and pxo_board, as they were separate, not sure though.. Konrad > +}; > + > +static const struct clk_parent_data gcc_cxo[] = { > + { .fw_name = "cxo", .name = "cxo" }, > +}; > + > #define DEFINE_CLK_RPM(_platform, _name, _active, r_id) \ > static struct clk_rpm _platform##_##_active; \ > static struct clk_rpm _platform##_##_name = { \ > @@ -32,8 +40,8 @@ > .hw.init = &(struct clk_init_data){ \ > .ops = &clk_rpm_ops, \ > .name = #_name, \ > - .parent_names = (const char *[]){ "pxo_board" }, \ > - .num_parents = 1, \ > + .parent_data = gcc_pxo, \ > + .num_parents = ARRAY_SIZE(gcc_pxo), \ > }, \ > }; \ > static struct clk_rpm _platform##_##_active = { \ > @@ -44,8 +52,8 @@ > .hw.init = &(struct clk_init_data){ \ > .ops = &clk_rpm_ops, \ > .name = #_active, \ > - .parent_names = (const char *[]){ "pxo_board" }, \ > - .num_parents = 1, \ > + .parent_data = gcc_pxo, \ > + .num_parents = ARRAY_SIZE(gcc_pxo), \ > }, \ > } > > @@ -56,8 +64,8 @@ > .hw.init = &(struct clk_init_data){ \ > .ops = &clk_rpm_xo_ops, \ > .name = #_name, \ > - .parent_names = (const char *[]){ "cxo_board" }, \ > - .num_parents = 1, \ > + .parent_data = gcc_cxo, \ > + .num_parents = ARRAY_SIZE(gcc_cxo), \ > }, \ > } > > @@ -68,8 +76,8 @@ > .hw.init = &(struct clk_init_data){ \ > .ops = &clk_rpm_fixed_ops, \ > .name = #_name, \ > - .parent_names = (const char *[]){ "pxo" }, \ > - .num_parents = 1, \ > + .parent_data = gcc_pxo, \ > + .num_parents = ARRAY_SIZE(gcc_pxo), \ > }, \ > } >