Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312516
b: refs/heads/master
c: 5a6881e
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jun 7, 2012
1 parent 7a00aaa commit f6da19a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93b07e7bcd50bb73d3d60043438fa68bd5a0988b
refs/heads/master: 5a6881e8e134ea636bbc8423049e84638dbb7106
8 changes: 8 additions & 0 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,14 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev,
{
int ret, voltage;

/* Allow uV_step to be 0 for fixed voltage */
if (rdev->desc->n_voltages == 1 && rdev->desc->uV_step == 0) {
if (min_uV <= rdev->desc->min_uV && rdev->desc->min_uV <= max_uV)
return 0;
else
return -EINVAL;
}

if (!rdev->desc->uV_step) {
BUG_ON(!rdev->desc->uV_step);
return -EINVAL;
Expand Down

0 comments on commit f6da19a

Please sign in to comment.