lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Oct 2020 09:06:01 +0100
From:   Cristian Marussi <cristian.marussi@....com>
To:     Mark Brown <broonie@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        sudeep.holla@....com, lukasz.luba@....com,
        james.quinlan@...adcom.com, Jonathan.Cameron@...wei.com,
        robh@...nel.org, satyakim@....qualcomm.com,
        etienne.carriere@...aro.org
Subject: Re: [PATCH 4/4] dt-bindings: arm: add support for SCMI Regulators

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ