Message ID | 20230707003710.2667989-2-xianwei.zhao@amlogic.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2949723vqx; Thu, 6 Jul 2023 18:34:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlHV8BvDGVc8wyUd5mXWg8XYlMFKDBrDooYvkalROJLZDUIhuxyEPCMXFl1254vKg8xXzesx X-Received: by 2002:a05:6808:200f:b0:3a3:7aa2:bf0d with SMTP id q15-20020a056808200f00b003a37aa2bf0dmr4051266oiw.38.1688693661659; Thu, 06 Jul 2023 18:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688693661; cv=none; d=google.com; s=arc-20160816; b=MdusvW53RbD6extF7jB5Cu5FBe2P/RDJmx+L70W81E9yrPaCgZXYj4el78cZfCjeb6 ORpDwzWgdtciEvoOH2S9rP4jv/1f0qy/oeahsR1GNYDgeYLFqd0aOErxypdsaA8vi8ft fOFoYMDQNuUdVn7Qr5zPcNM8FXXoPb/0CfM57CM+FKbmOHHrQ82mb9ORTmqv0ZHRuZT4 nWJpAPPSUF+DSib4hns5e3ETr2BtbHmFGB0FiTV4A8nowt9pNoNd1iiCcAloNGvEimPU +lxjReNSLkuw9egmYABbwx3moqwEN0whp0NSJvD2JEjkMpghsU9JLsp4gN+UiM0Hk2ts T9JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Dv2gy/Ml28++K09mtmH8tWTE8Lo2PHTAhjkAUPtBBE8=; fh=WzRG3WH3uvRbKqWQdKb+SWZNQhoyocMFA6Hw0LDjFNQ=; b=kFzhmMXRNOV1Cv6QkN42tEFBYO/nU8XgWYEcn33o320y7WX3v3UwMpoijw1zIGhYlX XmT0y0C5j7PTuDGk0gyG5xXRUion443C1NLja7QA1z891gVNxI2SDhxyNrvkHpe1Pb5m jTK9Fkup2JioOr8BnwDl1pe0rUyffmNdzITymBwcuLypNqQEcV+gp0dbrkej7zwzwTBR rko89EHT4tT6Zp9bZBmkYlfE4jNyrIF3puBi2urGpUkN68co0sOk9MQko0UNZ7niUXcN XiSna1j9cFFdZxl2LWAgz1oEkex+uKUxgqUelH41eg9JIpR1vigt61x2lrfkfC6TsEv4 /bVw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei31-20020a056a0080df00b0067c12c99c56si2422671pfb.117.2023.07.06.18.34.04; Thu, 06 Jul 2023 18:34:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232177AbjGGAhT (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 6 Jul 2023 20:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbjGGAhR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Jul 2023 20:37:17 -0400 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50BC619BD; Thu, 6 Jul 2023 17:37:16 -0700 (PDT) Received: from droid01-cd.amlogic.com (10.98.11.200) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.13; Fri, 7 Jul 2023 08:37:06 +0800 From: Xianwei Zhao <xianwei.zhao@amlogic.com> To: <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-kernel@vger.kernel.org> CC: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, "Neil Armstrong" <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Xianwei Zhao <xianwei.zhao@amlogic.com> Subject: [PATCH V2 1/4] soc: amlogic: use name instead of index as criterion Date: Fri, 7 Jul 2023 08:37:07 +0800 Message-ID: <20230707003710.2667989-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230707003710.2667989-1-xianwei.zhao@amlogic.com> References: <20230707003710.2667989-1-xianwei.zhao@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.98.11.200] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770723644760652125?= X-GMAIL-MSGID: =?utf-8?q?1770723644760652125?= |
Series |
Power: C3: add power domain driver
|
|
Commit Message
Xianwei Zhao
July 7, 2023, 12:37 a.m. UTC
The variate 'index' could be equal to zero in some SoCs. Such as C3 SoC,
PWRC_C3_NNA_ID be defined zero. Use 'name' instead of 'index' as criterion.
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
V1 -> V2: add a new patch for change.
---
drivers/soc/amlogic/meson-secure-pwrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 07/07/2023 02:37, Xianwei Zhao wrote: > The variate 'index' could be equal to zero in some SoCs. Such as C3 SoC, > PWRC_C3_NNA_ID be defined zero. Use 'name' instead of 'index' as criterion. > > Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> > --- > V1 -> V2: add a new patch for change. > --- > drivers/soc/amlogic/meson-secure-pwrc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c > index 25b4b71df9b8..c11d65a3e3d9 100644 > --- a/drivers/soc/amlogic/meson-secure-pwrc.c > +++ b/drivers/soc/amlogic/meson-secure-pwrc.c > @@ -179,7 +179,7 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev) > for (i = 0 ; i < match->count ; ++i) { > struct meson_secure_pwrc_domain *dom = &pwrc->domains[i]; > > - if (!match->domains[i].index) > + if (!match->domains[i].name) > continue; > > dom->pwrc = pwrc; Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On Fri, Jul 07, 2023 at 08:37:07AM +0800, Xianwei Zhao wrote: > The variate 'index' could be equal to zero in some SoCs. Such as C3 SoC, > PWRC_C3_NNA_ID be defined zero. Use 'name' instead of 'index' as criterion. > > Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> > --- > V1 -> V2: add a new patch for change. > --- > drivers/soc/amlogic/meson-secure-pwrc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c > index 25b4b71df9b8..c11d65a3e3d9 100644 > --- a/drivers/soc/amlogic/meson-secure-pwrc.c > +++ b/drivers/soc/amlogic/meson-secure-pwrc.c > @@ -179,7 +179,7 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev) > for (i = 0 ; i < match->count ; ++i) { > struct meson_secure_pwrc_domain *dom = &pwrc->domains[i]; > > - if (!match->domains[i].index) > + if (!match->domains[i].name) > continue; > > dom->pwrc = pwrc; > -- > 2.37.1 > > > _______________________________________________ > linux-amlogic mailing list > linux-amlogic@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-amlogic
diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 25b4b71df9b8..c11d65a3e3d9 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -179,7 +179,7 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev) for (i = 0 ; i < match->count ; ++i) { struct meson_secure_pwrc_domain *dom = &pwrc->domains[i]; - if (!match->domains[i].index) + if (!match->domains[i].name) continue; dom->pwrc = pwrc;