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>
This commit is contained in:

committed by
Liam Girdwood

parent
63cee94614
commit
3a93f2a9f4
@@ -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 */
|
||||
|
Reference in New Issue
Block a user