]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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 818d2041051867e8c255e75b08490da7477fe769..47f5663e99c8975c8a3fa6f06482e0459fcacee1 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,