summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/consumer.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-24 08:12:40 +0800
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-05-30 11:56:57 +0100
commitf21e0e81d81b649ad309cedc7226f1bed72982e0 (patch)
tree24fe19d6408b58a32c7f82df47f9e17fb76e1a5c /include/linux/regulator/consumer.h
parent55922c9d1b84b89cb946c777fddccb3247e7df2c (diff)
regulator: Do bulk enables of regulators in parallel
In order to reduce the impact of ramp times rather than enabling the regulators for a device in series use async tasks to run the actual enables. This means that the delays which the enables implement can all run in parallel, though it does mean that the order in which the supplies come on may be unstable. For super bonus fun points if any of the regulators are shared between multiple supplies on the same device (as is rather likely) then this will test our locking. Note that in this case we only delay once for each physical regulator so the threads shouldn't block each other while delaying. It'd be even nicer if we could coalesce writes to a shared enable registers in PMICs but that's definitely future work, and it may also be useful and is certainly more achievable to optimise out the parallelism if none of the regulators implement ramp delays. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/regulator/consumer.h')
-rw-r--r--include/linux/regulator/consumer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 9e87c1cb727..26f6ea4444e 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -122,6 +122,9 @@ struct regulator;
struct regulator_bulk_data {
const char *supply;
struct regulator *consumer;
+
+ /* Internal use */
+ int ret;
};
#if defined(CONFIG_REGULATOR)