Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292047
b: refs/heads/master
c: 2fe4e02
h: refs/heads/master
i:
  292045: f1e82a8
  292043: 04ee622
  292039: 361e6e9
  292031: 7e1c100
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 11, 2012
1 parent ed5bfdf commit 003a6a3
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: ae76e8307ff2812a57692a54322c6898a949ae76
refs/heads/master: 2fe4e0259dfd6d66f2a094b5109f11f8d253e764
12 changes: 6 additions & 6 deletions trunk/drivers/regulator/tps65217-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ static int tps65217_uv_to_vsel1(int uV, unsigned int *vsel)
return -EINVAL;

if (uV <= 1500000)
*vsel = (uV - 875001) / 25000;
*vsel = DIV_ROUND_UP(uV - 900000, 25000);
else if (uV <= 2900000)
*vsel = 24 + (uV - 1450001) / 50000;
*vsel = 24 + DIV_ROUND_UP(uV - 1500000, 50000);
else if (uV < 3300000)
*vsel = 52 + (uV - 2800001) / 100000;
*vsel = 52 + DIV_ROUND_UP(uV - 2900000, 100000);
else
*vsel = 56;

Expand Down Expand Up @@ -116,11 +116,11 @@ static int tps65217_uv_to_vsel2(int uV, unsigned int *vsel)
return -EINVAL;

if (uV <= 1900000)
*vsel = (uV - 1450001) / 50000;
*vsel = DIV_ROUND_UP(uV - 1500000, 50000);
else if (uV <= 2400000)
*vsel = 8 + (uV - 1800001) / 100000;
*vsel = 8 + DIV_ROUND_UP(uV - 1900000, 100000);
else
*vsel = 13 + (uV - 2350001) / 50000;
*vsel = 13 + DIV_ROUND_UP(uV - 2400000, 50000);

return 0;
}
Expand Down

0 comments on commit 003a6a3

Please sign in to comment.