regulator: lochnagar: Fix n_voltages setting for VDDCORE
authorAxel Lin <axel.lin@ingics.com>
Tue, 29 Jan 2019 03:01:56 +0000 (11:01 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 7 Feb 2019 14:13:07 +0000 (14:13 +0000)
With current n_voltages setting, regulator_list_voltage will return
-EINVAL when selector >=57. The highest selector is 0x41, so the
n_voltages should be 0x41+1, i.e. 66.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/lochnagar-regulator.c

index 818d204..47f5663 100644 (file)
@@ -194,7 +194,7 @@ static const struct regulator_desc lochnagar_regulators[] = {
                .name = "VDDCORE",
                .supply_name = "SYSVDD",
                .type = REGULATOR_VOLTAGE,
-               .n_voltages = 57,
+               .n_voltages = 66,
                .ops = &lochnagar_vddcore_ops,
 
                .id = LOCHNAGAR_VDDCORE,