lkml.org 
[lkml]   [2014]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] regulators: Add definition of regulator_set_voltage_time() for !CONFIG_REGULATOR
On Mon, Jun 02, 2014 at 03:45:37PM +0530, Viresh Kumar wrote:
> On 2 June 2014 15:32, Mark Brown <broonie@kernel.org> wrote:
> > No, think about what you're changing here. You're changing the stub -
> > the stub has a regulator_get() which always succeeeds.

> Now, why do we want to return -EINVAL from set_voltage here ? Similar
> routines in clk-API are returning 0 and even clk_get_rate() returns zero,
> unlike in regulators, as we return -EINVAL..

If the consumer tried to set a voltage presumably it cares if that
voltage was set - for example if your cpufreq driver tries to increase
the voltage of a core supply so that it can then raise the frequency the
user is going to be upset if the voltage was not actually raised and it
goes off and raises the clock rate causing the system to become unstable.

> Not sure which of these frameworks is doing the right thing.

I don't think the clock API should have clk_set_rate() report success if
it was ignored.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-06-02 15:01    [W:0.053 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site