* [PATCH] regulator: scmi: Allow for zero voltage domains
@ 2023-01-26 18:05 Cristian Marussi
2023-01-26 18:38 ` Mark Brown
2023-01-27 0:53 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Cristian Marussi @ 2023-01-26 18:05 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: sudeep.holla, Cristian Marussi, Mark Brown, Jim Quinlan,
Florian Fainelli
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(-)
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;
}
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: scmi: Allow for zero voltage domains
2023-01-26 18:05 [PATCH] regulator: scmi: Allow for zero voltage domains Cristian Marussi
@ 2023-01-26 18:38 ` Mark Brown
2023-01-26 22:03 ` Cristian Marussi
2023-01-27 0:53 ` Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2023-01-26 18:38 UTC (permalink / raw)
To: Cristian Marussi
Cc: linux-arm-kernel, linux-kernel, sudeep.holla, Jim Quinlan,
Florian Fainelli
[-- Attachment #1.1: Type: text/plain, Size: 261 bytes --]
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?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: scmi: Allow for zero voltage domains
2023-01-26 18:38 ` Mark Brown
@ 2023-01-26 22:03 ` Cristian Marussi
0 siblings, 0 replies; 4+ messages in thread
From: Cristian Marussi @ 2023-01-26 22:03 UTC (permalink / raw)
To: Mark Brown
Cc: linux-arm-kernel, linux-kernel, sudeep.holla, Jim Quinlan,
Florian Fainelli
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: scmi: Allow for zero voltage domains
2023-01-26 18:05 [PATCH] regulator: scmi: Allow for zero voltage domains Cristian Marussi
2023-01-26 18:38 ` Mark Brown
@ 2023-01-27 0:53 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-01-27 0:53 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, Cristian Marussi
Cc: sudeep.holla, Jim Quinlan, Florian Fainelli
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-27 0:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 18:05 [PATCH] regulator: scmi: Allow for zero voltage domains Cristian Marussi
2023-01-26 18:38 ` Mark Brown
2023-01-26 22:03 ` Cristian Marussi
2023-01-27 0:53 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).