Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288454
b: refs/heads/master
c: 9365121
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 11, 2012
1 parent 9a5e001 commit 4563a5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 7b95765495d0b296cf35e97e68c780b208c85ad5
refs/heads/master: 9365121869a15da99d6091802f11a82d59024d62
8 changes: 4 additions & 4 deletions trunk/drivers/regulator/da9052-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int da9052_regulator_set_voltage_int(struct regulator_dev *rdev,
if (min_uV < info->min_uV)
min_uV = info->min_uV;

*selector = (min_uV - info->min_uV) / info->step_uV;
*selector = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);

ret = da9052_list_voltage(rdev, *selector);
if (ret < 0)
Expand Down Expand Up @@ -318,10 +318,10 @@ static int da9052_set_buckperi_voltage(struct regulator_dev *rdev, int min_uV,
if ((regulator->da9052->chip_id == DA9052) &&
(min_uV >= DA9052_CONST_3uV))
*selector = DA9052_BUCK_PERI_REG_MAP_UPTO_3uV +
((min_uV - DA9052_CONST_3uV) /
(DA9052_BUCK_PERI_3uV_STEP));
DIV_ROUND_UP(min_uV - DA9052_CONST_3uV,
DA9052_BUCK_PERI_3uV_STEP);
else
*selector = (min_uV - info->min_uV) / info->step_uV;
*selector = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);

ret = da9052_list_buckperi_voltage(rdev, *selector);
if (ret < 0)
Expand Down

0 comments on commit 4563a5a

Please sign in to comment.