提交 a1ff89ef 编写于 作者: M Mark Brown

regulator: Add WM1811 support

The WM1811 has a slightly different range on LDO2 to other WM8994 class
devices.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 4f6d45f1
......@@ -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;
}
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册