Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292063
b: refs/heads/master
c: 5db6d09
h: refs/heads/master
i:
  292061: 336bb6f
  292059: 7334bb9
  292055: 93da967
  292047: 003a6a3
  292031: 7e1c100
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 13, 2012
1 parent 0185aa3 commit 3a7d18e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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: 42b5efe4f9aa40b3b0a20149fd7357d9d6c96959
refs/heads/master: 5db6d09a2b4663735121dfe4222860424788a93f
4 changes: 2 additions & 2 deletions trunk/drivers/regulator/max8925-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static int max8925_set_voltage(struct regulator_dev *rdev,
min_uV, max_uV);
return -EINVAL;
}
data = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV;
data = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);
*selector = data;
data <<= info->vol_shift;
mask = ((1 << info->vol_nbits) - 1) << info->vol_shift;
Expand Down Expand Up @@ -140,7 +140,7 @@ static int max8925_set_dvm_voltage(struct regulator_dev *rdev, int uV)
if (uV < SD1_DVM_VMIN || uV > SD1_DVM_VMAX)
return -EINVAL;

data = (uV - SD1_DVM_VMIN + SD1_DVM_STEP - 1) / SD1_DVM_STEP;
data = DIV_ROUND_UP(uV - SD1_DVM_VMIN, SD1_DVM_STEP);
data <<= SD1_DVM_SHIFT;
mask = 3 << SD1_DVM_SHIFT;

Expand Down

0 comments on commit 3a7d18e

Please sign in to comment.