Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298576
b: refs/heads/master
c: 09bf14b
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 26, 2012
1 parent 6e1c40d commit 000e391
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 51579137c500362018b5341f5dca47807ed558aa
refs/heads/master: 09bf14b901f2c1908b6a72fe934457acdd1fa430
6 changes: 4 additions & 2 deletions trunk/drivers/regulator/wm831x-dcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev,
if (i == ARRAY_SIZE(wm831x_dcdc_ilim))
return -EINVAL;

return wm831x_set_bits(wm831x, reg, WM831X_DC1_HC_THR_MASK, i);
return wm831x_set_bits(wm831x, reg, WM831X_DC1_HC_THR_MASK,
i << WM831X_DC1_HC_THR_SHIFT);
}

static int wm831x_buckv_get_current_limit(struct regulator_dev *rdev)
Expand All @@ -400,7 +401,8 @@ static int wm831x_buckv_get_current_limit(struct regulator_dev *rdev)
if (val < 0)
return val;

return wm831x_dcdc_ilim[val & WM831X_DC1_HC_THR_MASK];
val = (val & WM831X_DC1_HC_THR_MASK) >> WM831X_DC1_HC_THR_SHIFT;
return wm831x_dcdc_ilim[val];
}

static struct regulator_ops wm831x_buckv_ops = {
Expand Down

0 comments on commit 000e391

Please sign in to comment.