Skip to content

Commit

Permalink
regulator: Add WM1811 support
Browse files Browse the repository at this point in the history
The WM1811 has a slightly different range on LDO2 to other WM8994 class
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Oct 7, 2011
1 parent 4f6d45f commit a1ff89e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/regulator/wm8994-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ static int wm8994_ldo2_list_voltage(struct regulator_dev *rdev,
return (selector * 100000) + 900000;
case WM8958:
return (selector * 100000) + 1000000;
case WM1811:
switch (selector) {
case 0:
return -EINVAL;
default:
return (selector * 100000) + 950000;
}
break;
default:
return -EINVAL;
}
Expand Down Expand Up @@ -170,6 +178,11 @@ static int wm8994_ldo2_set_voltage(struct regulator_dev *rdev,
case WM8958:
selector = (min_uV - 1000000) / 100000;
break;
case WM1811:
selector = (min_uV - 950000) / 100000;
if (selector == 0)
selector = 1;
break;
default:
return -EINVAL;
}
Expand Down

0 comments on commit a1ff89e

Please sign in to comment.