summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorMark Brown2010-11-10 15:38:29 +0100
committerLiam Girdwood2011-01-12 15:32:59 +0100
commit3a93f2a9f4d8f73d74c0e552feb68a10f778a219 (patch)
tree8a9f503f2f061ad3fe9712b0986b0da346f4c8d2 /include/linux/regulator
parentregulator: lock supply in regulator enable (diff)
downloadkernel-qcow2-linux-3a93f2a9f4d8f73d74c0e552feb68a10f778a219.tar.gz
kernel-qcow2-linux-3a93f2a9f4d8f73d74c0e552feb68a10f778a219.tar.xz
kernel-qcow2-linux-3a93f2a9f4d8f73d74c0e552feb68a10f778a219.zip
regulator: Report actual configured voltage to set_voltage()
Change the interface used by set_voltage() to report the selected value to the regulator core in terms of a selector used by list_voltage(). This allows the regulator core to know the voltage that was chosen without having to do an explict get_voltage(), which would be much more expensive as it will generally access hardware. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/driver.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 592cd7c642c2..4275cd475eac 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -79,7 +79,8 @@ struct regulator_ops {
int (*list_voltage) (struct regulator_dev *, unsigned selector);
/* get/set regulator voltage */
- int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV);
+ int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV,
+ unsigned *selector);
int (*get_voltage) (struct regulator_dev *);
/* get/set regulator current */