summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps6287x-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2023-05-16 11:23:33 +0300
committerMark Brown <broonie@kernel.org>2023-05-17 04:38:20 +0300
commit15a1cd245d5b3cc6cf42ca9ceacf9a6dfc2e33b4 (patch)
treeb58c9ef27e759fdd4a4f7fe5232069dadd33eeb3 /drivers/regulator/tps6287x-regulator.c
parentcf27b7d9a574f3383be0ed1953cceda9a715eb51 (diff)
downloadlinux-15a1cd245d5b3cc6cf42ca9ceacf9a6dfc2e33b4.tar.xz
regulator: tps6287x: Fix missing .n_voltages setting
Otherwise, regulator_list_voltage() will return -EINVAL. Signed-off-by: Axel Lin <axel.lin@ingics.com Link: https://lore.kernel.org/r/20230516082333.466429-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org
Diffstat (limited to 'drivers/regulator/tps6287x-regulator.c')
-rw-r--r--drivers/regulator/tps6287x-regulator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/tps6287x-regulator.c b/drivers/regulator/tps6287x-regulator.c
index d7fc82175493..870e63ce3ff2 100644
--- a/drivers/regulator/tps6287x-regulator.c
+++ b/drivers/regulator/tps6287x-regulator.c
@@ -119,6 +119,7 @@ static struct regulator_desc tps6287x_reg = {
.ramp_mask = TPS6287X_CTRL1_VRAMP,
.ramp_delay_table = tps6287x_ramp_table,
.n_ramp_values = ARRAY_SIZE(tps6287x_ramp_table),
+ .n_voltages = 256,
.linear_ranges = tps6287x_voltage_ranges,
.n_linear_ranges = ARRAY_SIZE(tps6287x_voltage_ranges),
.linear_range_selectors = tps6287x_voltage_range_sel,