File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,20 @@ static int mp8859_get_voltage_sel(struct regulator_dev *rdev)
81
81
return val ;
82
82
}
83
83
84
+ static int mp8859_set_voltage_time_sel (struct regulator_dev * rdev ,
85
+ unsigned int from , unsigned int to )
86
+ {
87
+ int change ;
88
+
89
+ /* The voltage ramps at 1mV/uS, selectors are 10mV */
90
+ if (from > to )
91
+ change = from - to ;
92
+ else
93
+ change = to - from ;
94
+
95
+ return change * 10 * 1000 ;
96
+ }
97
+
84
98
static unsigned int mp8859_get_mode (struct regulator_dev * rdev )
85
99
{
86
100
unsigned int val ;
@@ -220,6 +234,7 @@ static const struct regulator_ops mp8859_ops = {
220
234
.set_voltage_sel = mp8859_set_voltage_sel ,
221
235
.get_voltage_sel = mp8859_get_voltage_sel ,
222
236
.list_voltage = regulator_list_voltage_linear_range ,
237
+ .set_voltage_time_sel = mp8859_set_voltage_time_sel ,
223
238
.enable = regulator_enable_regmap ,
224
239
.disable = regulator_disable_regmap ,
225
240
.is_enabled = regulator_is_enabled_regmap ,
You can’t perform that action at this time.
0 commit comments