Thread (7 messages) 7 messages, 3 authors, 2012-07-31

[PATCH 3/3] cpufreq: Add a generic cpufreq-cpu0 driver

From: Shawn Guo <hidden>
Date: 2012-07-31 04:20:52
Also in: linux-devicetree
Subsystem: the rest, voltage and current regulator framework · Maintainers: Linus Torvalds, Liam Girdwood, Mark Brown

Possibly related (same subject, not in this thread)

On Mon, Jul 30, 2012 at 07:53:45PM +0100, Mark Brown wrote:
Quite honestly this seems totally unrealistic for the majority of users,
I doubt that.  Searching drivers/cpufreq folder, I can see there are
several cpufreq drivers scaling voltage with regulator API, but none
of them is calling regulator_set_voltage_time to find voltage latency.
That said, all these users are specify transition latency on their own.
especially given the very poor documentation for this stuff which SoC
vendors typically provide.  It's a reasonable amount of work to go back
and figure this stuff out (especially given that it should be varying
depending on the transition in question), and it's going to give us a
bunch of magic numbers in people's bindings.
There will be only one magic number, and it can easily become "magic"
with some comments put there.
No, add a new API.
Is the following patch what you are ordering here?
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index da339fd..bfd3cfb 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -352,4 +352,11 @@ static inline void regulator_set_drvdata(struct regulator *regulator,

 #endif

+static inline int regulator_set_voltage_tolerance(struct regulator *regulator,
+                                                 int new_uV, int tol_uV)
+{
+       return regulator_set_voltage(regulator,
+                                    new_uV - tol_uV, new_uV + tol_uV);
+}
+
 #endif
-- 
Regards,
Shawn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help