projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e1d67e
)
regulator: da9052: set_current_limit should select the maximum current in specific...
author
Axel Lin
<axel.lin@gmail.com>
Wed, 8 Aug 2012 12:23:54 +0000
(20:23 +0800)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Tue, 28 Aug 2012 18:00:26 +0000
(11:00 -0700)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/da9052-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/da9052-regulator.c
b/drivers/regulator/da9052-regulator.c
index 903299cf15cfe8c9716d583fc3c49d76d4ac2d04..27355b1199e571ed090f24c5799dce5511d2cc94 100644
(file)
--- a/
drivers/regulator/da9052-regulator.c
+++ b/
drivers/regulator/da9052-regulator.c
@@
-133,8
+133,8
@@
static int da9052_dcdc_set_current_limit(struct regulator_dev *rdev, int min_uA,
max_uA < da9052_current_limits[row][DA9052_MIN_UA])
return -EINVAL;
- for (i =
0; i < DA9052_CURRENT_RANGE; i++
) {
- if (
min_uA <= da9052_current_limits[row][i]
) {
+ for (i =
DA9052_CURRENT_RANGE - 1; i >= 0; i--
) {
+ if (
da9052_current_limits[row][i] <= max_uA
) {
reg_val = i;
break;
}