linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com,
	lukasz.luba@arm.com, james.quinlan@broadcom.com,
	Jonathan.Cameron@Huawei.com, robh@kernel.org,
	satyakim@qti.qualcomm.com, etienne.carriere@linaro.org
Subject: Re: [PATCH 4/4] dt-bindings: arm: add support for SCMI Regulators
Date: Wed, 7 Oct 2020 09:06:01 +0100	[thread overview]
Message-ID: <20201007080601.GA21759@e119603-lin.cambridge.arm.com> (raw)
In-Reply-To: <20201006105922.GC5259@sirena.org.uk>

Hi Mark

thanks for reviewing this series.
 
On Tue, Oct 06, 2020 at 11:59:22AM +0100, Mark Brown wrote:
> On Mon, Oct 05, 2020 at 11:26:23PM +0100, Cristian Marussi wrote:
> 
> > +An SCMI Regulator is permanently bound to a well defined SCMI Voltage Domain,
> > +and should be always positioned as a root regulator.
> > +It does not support negative voltages nor any current operation.
> 
> Support for negative voltages is an implementation detail of Linux, IIRC
> there's nothing in the generic regulator binding preventing it and even
> if there were updates to the generic binding are what are relevant here
> - they could start working with no updates to this binding.
> 
> > +Optional properties:
> > + - regulator-min-microvolt: when defined should be non-negative.
> > + - regulator-max-microvolt: when defined should be non-negative.
> 
> These are covered by the generic regulator binding, no need to duplicate
> the documentation here.

Right I'll drop this references to negative voltages in the bindings.

Anyway, the underlying SCMI Voltage Domain protocol do support negatives
and just expose a negative_volts_allowed flags in the Voltage descriptor
if the domain is advertised by fw as supporting negatives.

Based on that, since the regulator framework as of now cannot report
negative voltages (since the .get ops return an int which is used also
for reporting negative error codes), the SCMI regulator driver in this
series just checks for that flag on every found Voltage Domain and refuse
to handle it like:

if (vinfo->negative_volts_allowed) {
+		dev_warn(dev, "Negative voltages NOT supported...skip %s\n",
+			 sreg->of_node->full_name);
+		return -EOPNOTSUPP;
+	}

So the driver itself will need to be patched in this regards the day the
regulator framework should support negatives, it won't just work.
(but I suppose this is not a problem since it will need to be changed anyway
to use properly this possible new API handling negatives.)

Thanks

Cristian


  reply	other threads:[~2020-10-07  8:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 22:26 [PATCH 0/4] Add support for SCMIv3.0 Voltage Domain Protocol and SCMI-Regulator Cristian Marussi
2020-10-05 22:26 ` [PATCH 1/4] firmware: arm_scmi: Add Voltage Domain Support Cristian Marussi
2020-10-08 10:10   ` Etienne Carriere
2020-10-09 12:37     ` Cristian Marussi
2020-10-05 22:26 ` [PATCH 2/4] firmware: arm_scmi: add SCMI Voltage Domain devname Cristian Marussi
2020-10-05 22:26 ` [PATCH 3/4] regulator: add SCMI driver Cristian Marussi
2020-10-06 10:56   ` Mark Brown
2020-10-15 15:38     ` Cristian Marussi
2020-10-05 22:26 ` [PATCH 4/4] dt-bindings: arm: add support for SCMI Regulators Cristian Marussi
2020-10-06 10:59   ` Mark Brown
2020-10-07  8:06     ` Cristian Marussi [this message]
2020-10-06  0:38 ` [PATCH 0/4] Add support for SCMIv3.0 Voltage Domain Protocol and SCMI-Regulator Florian Fainelli
2020-10-09 12:42   ` Cristian Marussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201007080601.GA21759@e119603-lin.cambridge.arm.com \
    --to=cristian.marussi@arm.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=broonie@kernel.org \
    --cc=etienne.carriere@linaro.org \
    --cc=james.quinlan@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=robh@kernel.org \
    --cc=satyakim@qti.qualcomm.com \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).