Re: [PATCH 1/2] regulators: Add definition of regulator_set_voltage_time() for !CONFIG_REGULATOR
From: Viresh Kumar
Date: Mon Jun 02 2014 - 09:14:43 EST
On 2 June 2014 17:53, Mark Brown <broonie@xxxxxxxxxx> wrote:
> 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.
If the driver continued despite getting regulator as NULL, it means that
regulator isn't a MUST for it. For example a CPUFreq driver may work
with or without a regulator.
Now if the dummy calls return *error* for some cases then these driver
will have to do
if(xyz)
API-call()..
And so dummy APIs like clk_set_rate(), clk_get_rate(),
regulator_set_voltage() must return zero..
To get rid of this in drivers these dummy routines *must* behave as
they passed, if the drivers really care about them then they must
quit as soon as regulator_get() returned NULL.
This is why we have such implementations in clk framework which are
very well thought earlier.
Does this make sense?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/