summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-08-16 12:26:02 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-28 11:00:28 -0700
commit7305608bc888271786e38aa27e63f846367ae842 (patch)
tree30ebe6fc1e2452b298ea6a5f8e568690d76cb0f1 /drivers/regulator
parent8f52a5800ab8f47a9bc430e21d5af84b6c290423 (diff)
regulator: max8907: Fix n_voltages for MAX8907B SD1
For linear voltage mapping, the n_voltages is (max - min) / step + 1 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/max8907-regulator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index bd3b28b55231..bdf21a199612 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -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++) {