summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-10 17:28:07 +0000
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-01-12 14:33:01 +0000
commit476c2d83c7ffb2429b2a504fbdb4326fc8a9d0e8 (patch)
treecdc7b4161bef5aa90a9f375229dc3dc61900ea6c /include/linux/regulator
parent1bf5a1f86a328122714680cd59951074b4f31e07 (diff)
downloadblackbird-op-linux-476c2d83c7ffb2429b2a504fbdb4326fc8a9d0e8.tar.gz
blackbird-op-linux-476c2d83c7ffb2429b2a504fbdb4326fc8a9d0e8.zip
regulator: Allow drivers to report voltages as selectors
Since drivers already have to provide an API for translating selectors into voltages they may as well just report the selector values directly to the core API rather than implement the lookup themselves. The old interface is left in place for now, but may be removed in future. 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, 3 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index cce575359712..bf3e653591b9 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -43,6 +43,8 @@ enum regulator_status {
* @set_voltage: Set the voltage for the regulator within the range specified.
* The driver should select the voltage closest to min_uV.
* @get_voltage: Return the currently configured voltage for the regulator.
+ * @get_voltage_sel: Return the currently configured voltage selector for the
+ * regulator.
* @list_voltage: Return one of the supported voltages, in microvolts; zero
* if the selector indicates a voltage that is unusable on this system;
* or negative errno. Selectors range from zero to one less than
@@ -82,6 +84,7 @@ struct regulator_ops {
int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV,
unsigned *selector);
int (*get_voltage) (struct regulator_dev *);
+ int (*get_voltage_sel) (struct regulator_dev *);
/* get/set regulator current */
int (*set_current_limit) (struct regulator_dev *,
OpenPOWER on IntegriCloud