提交 7305608b 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: max8907: Fix n_voltages for MAX8907B SD1

For linear voltage mapping, the n_voltages is (max - min) / step + 1
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Acked-by: NStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 8f52a580
......@@ -286,7 +286,8 @@ static __devinit int max8907_regulator_probe(struct platform_device *pdev)
MAX8907_II2RR_VERSION_REV_B) {
pmic->desc[MAX8907_SD1].min_uV = 637500;
pmic->desc[MAX8907_SD1].uV_step = 12500;
pmic->desc[MAX8907_SD1].n_voltages = (1425000 - 637500) / 12500;
pmic->desc[MAX8907_SD1].n_voltages =
(1425000 - 637500) / 12500 + 1;
}
for (i = 0; i < MAX8907_NUM_REGULATORS; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册