Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210718
b: refs/heads/master
c: 3e352f9
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Sep 1, 2010
1 parent b5e6402 commit b2d1d08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4876a3bc041e8e40af20b8addbec6d0a42e3842
refs/heads/master: 3e352f9e02a37c11df695aabfe49faebf507971b
12 changes: 6 additions & 6 deletions trunk/drivers/regulator/max1586.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ static int max1586_v6_set(struct regulator_dev *rdev, int min_uV, int max_uV)
if (max_uV < MAX1586_V6_MIN_UV || max_uV > MAX1586_V6_MAX_UV)
return -EINVAL;

if (min_uV >= 3000000)
selector = 3;
if (min_uV < 3000000)
selector = 2;
if (min_uV < 2500000)
selector = 1;
if (min_uV < 1800000)
selector = 0;
else if (min_uV < 2500000)
selector = 1;
else if (min_uV < 3000000)
selector = 2;
else if (min_uV >= 3000000)
selector = 3;

if (max1586_v6_calc_voltage(selector) > max_uV)
return -EINVAL;
Expand Down

0 comments on commit b2d1d08

Please sign in to comment.