Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp498117rwl; Tue, 11 Apr 2023 23:09:44 -0700 (PDT) X-Google-Smtp-Source: AKy350YeRNELq1qle8xTCxf+FXCUMXio1Z1PHPn7O7rkopNV4pB+Kr/pRRThteqHh89aNQ6WJDce X-Received: by 2002:a62:1706:0:b0:633:3954:986e with SMTP id 6-20020a621706000000b006333954986emr1422457pfx.28.1681279783807; Tue, 11 Apr 2023 23:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681279783; cv=none; d=google.com; s=arc-20160816; b=m0SeEWZ/UziQPv3svA6KuOeYJVE7qr3Te/IeH3v9oWzKjGsKwU17S8GtduOwlxehIt d+0CzwiPkh35p+YqMiLhwJCaV22i8X1Asw8QLydm3X6NPCBnva4M/XvdQp4t7Rqc9QoR pMPfap7kxWm9QjYXouJ05N25QBZngnp4+lPmwHh2T59qG98dBQe4wEOVU4YsoAjzLgWd KCdQn5DQ+GJ0zNWS28CXUk1Aw85THLOJaTtxdGEVQoEFMN9nCPsGNU3M4BzjUcQEEoIq lA+IxE4d2GVSAui91BUhXQ/QZZYqPf6PBYon1ZHLKuyy2w2wb+Ci9XwIUQrc3KLVcfnf uSuA== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=05nd8zHjdjIhmJPqiiAyhydGyBPsiXVmaapV2meWQ6E=; b=I1lVrWgE2JsQUxE6HnfPfrAVnzjnoTxahFhHFGKtXK4xfEo196oZ7xCQJgiL2VjbNT VirYrjbJZwIGXGPIlQevrFYm5fDBwkbwofROQK0400lh5l6/kwedRcDuN72HDLeweNxy 4AnqsnUI36ZIJZ259jMEOrluoU6eTzA28YxDd1piwiRNZa7t73PfbvyVOJtzrmTbuuBH 6lwDapLh2HjQws8Rd+ox3inkB3qSGdXBEE4KLm94UYPeAMPz233tVg10gf96u/83p6h3 0NfO1PBR9qztcKJGmTkZQYAAmXr8TalYDaP9tiQQ0PbYlr2RC0MjfoJKz9Cya/J6RWMH h8aw== 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 h62-20020a638341000000b0050c0cdce84asi10774397pge.577.2023.04.11.23.09.32; Tue, 11 Apr 2023 23:09:43 -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 S229593AbjDLGIC (ORCPT + 99 others); Wed, 12 Apr 2023 02:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjDLGIB (ORCPT ); Wed, 12 Apr 2023 02:08:01 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 653E6B8; Tue, 11 Apr 2023 23:07:57 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 703CC24E196; Wed, 12 Apr 2023 14:07:54 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 12 Apr 2023 14:07:54 +0800 Received: from [192.168.125.109] (113.72.145.176) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 12 Apr 2023 14:07:53 +0800 Message-ID: Date: Wed, 12 Apr 2023 14:07:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v1 5/7] soc: starfive: Use call back to parse device tree resources Content-Language: en-US To: Changhuang Liang , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou CC: , , References: <20230411064743.273388-1-changhuang.liang@starfivetech.com> <20230411064743.273388-6-changhuang.liang@starfivetech.com> From: Walker Chen In-Reply-To: <20230411064743.273388-6-changhuang.liang@starfivetech.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [113.72.145.176] X-ClientProxiedBy: EXCAS063.cuchost.com (172.16.6.23) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS 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 2023/4/11 14:47, Changhuang Liang wrote: > Different compatible parse device tree resources work in different ways. > > Signed-off-by: Changhuang Liang I don't think it's necessary to submit multiple patches separately for the same .c file unless it is very necessary. Because the disadvantage of separating multiple patches is that some information lacks completeness and coherence. > --- > drivers/soc/starfive/jh71xx_pmu.c | 54 ++++++++++++++++++++++--------- > 1 file changed, 39 insertions(+), 15 deletions(-) > > diff --git a/drivers/soc/starfive/jh71xx_pmu.c b/drivers/soc/starfive/jh71xx_pmu.c > index 98f6849d61de..990db6735c48 100644 > --- a/drivers/soc/starfive/jh71xx_pmu.c > +++ b/drivers/soc/starfive/jh71xx_pmu.c > @@ -57,10 +57,14 @@ struct jh71xx_domain_info { > u8 bit; > }; > > +struct jh71xx_pmu; > + > struct jh71xx_pmu_match_data { > const struct jh71xx_domain_info *domain_info; > int num_domains; > u8 pmu_type; > + int (*pmu_parse_dt)(struct platform_device *pdev, > + struct jh71xx_pmu *pmu); > }; > > struct jh71xx_pmu { > @@ -251,6 +255,31 @@ static irqreturn_t jh71xx_pmu_interrupt(int irq, void *data) > return IRQ_HANDLED; > } > > +static int jh7110_pmu_general_parse_dt(struct platform_device *pdev, > + struct jh71xx_pmu *pmu) > +{