Re: [PATCH 1/2] regulators: Add definition of regulator_set_voltage_time() for !CONFIG_REGULATOR

Mark Brown
2014-06-04T10:39:26Z

[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]

On Wed, Jun 04, 2014 at 11:16:37AM +0530, Viresh Kumar wrote:

> - But for platforms without regulators support (CONFIG_REGULATOR=n),
> regulator_get() will return NULL (a valid regulator though) and
> regulator_set_voltage() will fail. Because the platform doesn't care much
> about regulators it must go on and change frequency as if nothing
> happened.

No, approximately none of this is true. CONFIG_REGULATOR tells you
nothing about the hardware, it tells you what someone selected in the
kernel config. There is nothing stopping anyone enabling the API on any
platform, and there is nothing stopping anyone disabling the API when
building a kernel for a platform which can do something with regulators
with CONFIG_REGULATOR disabled.

Please, go and *think* about what's going on here. I've repeatedly
asked you to consider the case where we need to raise the voltage prior
to raising the frequency for cpufreq but you've not responded to these
requests either directly or in showing any sign of having understood the
issue.

If the code fails to change the voltage it needs to handle that
(including remembering that attempts to lower the voltage fail); if the
code handles the errors sensibly I would expect that to handle
everything.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]