Message ID | 20230126180511.766373-1-cristian.marussi@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp417619wrn; Thu, 26 Jan 2023 10:16:36 -0800 (PST) X-Google-Smtp-Source: AK7set/6Mx+33nuWqT1tq4fCIt2C3H4LV9aIG+jLHV+Z5o10k9cybO7rcDLVa5YzqLvozJHPMpgm X-Received: by 2002:a17:903:1cf:b0:194:d1eb:7a39 with SMTP id e15-20020a17090301cf00b00194d1eb7a39mr3516178plh.14.1674756995943; Thu, 26 Jan 2023 10:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674756995; cv=none; d=google.com; s=arc-20160816; b=RvR7EQVAviOyDVCwdYQ8ebQfkPNAphQhd14i0eHiWFc8h9V3BDRdK4T1tss5WoMLFF zeazg9rD4V6Md8VvUwCT3/T1PEGyQsaB6XUwRkl5Gv1Ua29n8jKrqtS8OA7CYAiAmQPi fno3PAH9XQPgT8ueO00/aZN9IL8oakB3vLJCrHrGm4K2g82YXgMGTBGdp03vr8QlDFFC DA+dIEOl/NAaNvFotRl7Cc5VZcxp5cE1y4ovjyQjbIURdaHMJeI9EJ51LMARhj/AAv1z lM2B7bt4m3dJa95zLwHB3tsh2sfMaamCnbGhtAygqk7FXoiLbSl07Tly0gZvTV9nmQGq Zesw== 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 :message-id:date:subject:cc:to:from; bh=vYwJAO+cTeKy7vj5pPcJFvI1wytbvTpKInmtKTJY5fY=; b=qA0iYFNvBLpO1KqpnCR9IE7nWaVzgrWk09YFOrt3rG4fzyMTeSEpOdzllczzCPsX6I 88sdrUQ0ISgVgX0k+AdHDzlFemCtFgi3mSbMiFmZx3qgc3SaL5rABb3GRnav/rlhkEJv WilXULugd/N9WzwsTGzBuRUDsVeuZN8FFEN5q4dM6gAdFOdWb78Nsvh8QFyj/xipAo56 uTPNW4ubrISJoIq1/DkKKE1d7N9SFXTYmlVrZubDPHhYhQfvT+JYzTpLfeIjsC8bhFWc N6QItEjuNqez/n7nihYNg9mf8Ni6XrK0CxAgGYwoK+GhM0iH0DCgbc5RWArTXxD7mYM4 oqKg== 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=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11-20020a170902e84b00b001949b544e31si2206064plg.601.2023.01.26.10.16.23; Thu, 26 Jan 2023 10:16:35 -0800 (PST) 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231612AbjAZSFk (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Thu, 26 Jan 2023 13:05:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbjAZSFj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Jan 2023 13:05:39 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 902DC23D83 for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 10:05:38 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5E304B3; Thu, 26 Jan 2023 10:06:19 -0800 (PST) Received: from e120937-lin.. (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D600B3F71E; Thu, 26 Jan 2023 10:05:36 -0800 (PST) From: Cristian Marussi <cristian.marussi@arm.com> To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: sudeep.holla@arm.com, Cristian Marussi <cristian.marussi@arm.com>, Mark Brown <broonie@kernel.org>, Jim Quinlan <james.quinlan@broadcom.com>, Florian Fainelli <florian.fainelli@broadcom.com> Subject: [PATCH] regulator: scmi: Allow for zero voltage domains Date: Thu, 26 Jan 2023 18:05:11 +0000 Message-Id: <20230126180511.766373-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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?1756109991904185382?= X-GMAIL-MSGID: =?utf-8?q?1756109991904185382?= |
Series |
regulator: scmi: Allow for zero voltage domains
|
|
Commit Message
Cristian Marussi
Jan. 26, 2023, 6:05 p.m. UTC
SCMI Voltage protocol allows the platform to report no voltage domains
on discovery, while warning the user about such an odd configuration.
As a consequence this condition should not be treated as error by the SCMI
regulator driver either.
Allow SCMI regulator driver to probe successfully even when no voltage
domains are discovered.
Cc: Mark Brown <broonie@kernel.org>
Cc: Jim Quinlan <james.quinlan@broadcom.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Fixes: 0fbeae70ee7c ("regulator: add SCMI driver")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
drivers/regulator/scmi-regulator.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
Comments
On Thu, Jan 26, 2023 at 06:05:11PM +0000, Cristian Marussi wrote: > SCMI Voltage protocol allows the platform to report no voltage domains > on discovery, while warning the user about such an odd configuration. This patch removes all diagnostics in this case?
On Thu, Jan 26, 2023 at 06:38:20PM +0000, Mark Brown wrote: > On Thu, Jan 26, 2023 at 06:05:11PM +0000, Cristian Marussi wrote: > > SCMI Voltage protocol allows the platform to report no voltage domains > > on discovery, while warning the user about such an odd configuration. > > This patch removes all diagnostics in this case? You'll still see a warning from the SCMI core Voltage Protocol saying: "No Voltage domains found." but nothing from the regulator driver itself which will successfully probe, albeit not creating any regulators...if this is what you mean. Thanks for having a look, Cristian
On Thu, 26 Jan 2023 18:05:11 +0000, Cristian Marussi wrote: > SCMI Voltage protocol allows the platform to report no voltage domains > on discovery, while warning the user about such an odd configuration. > As a consequence this condition should not be treated as error by the SCMI > regulator driver either. > > Allow SCMI regulator driver to probe successfully even when no voltage > domains are discovered. > > [...] Applied to broonie/regulator.git for-next Thanks! [1/1] regulator: scmi: Allow for zero voltage domains commit: 668f777d02f61faa834f1e24f3b99576dbe5ff6b All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/regulator/scmi-regulator.c b/drivers/regulator/scmi-regulator.c index b9918f4fd241..29ab217297d6 100644 --- a/drivers/regulator/scmi-regulator.c +++ b/drivers/regulator/scmi-regulator.c @@ -311,16 +311,12 @@ static int scmi_regulator_probe(struct scmi_device *sdev) return PTR_ERR(voltage_ops); num_doms = voltage_ops->num_domains_get(ph); - if (num_doms <= 0) { - if (!num_doms) { - dev_err(&sdev->dev, - "number of voltage domains invalid\n"); - num_doms = -EINVAL; - } else { - dev_err(&sdev->dev, - "failed to get voltage domains - err:%d\n", - num_doms); - } + if (!num_doms) + return 0; + + if (num_doms < 0) { + dev_err(&sdev->dev, "failed to get voltage domains - err:%d\n", + num_doms); return num_doms; }