Skip to content

Commit

Permalink
regulator: tps6287x: Fix n_voltages
Browse files Browse the repository at this point in the history
[ Upstream commit c692905 ]

There are 256 possible voltage settings for each range, not 256 possible
voltage settings in total.

Fixes: 15a1cd2 ("regulator: tps6287x: Fix missing .n_voltages setting")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com
Link: https://lore.kernel.org/r/20230829-tps-voltages-v1-1-7ba4f958a194@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
vwax authored and gregkh committed Sep 19, 2023
1 parent a3f87e6 commit 2d2b4d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/tps6287x-regulator.c
Expand Up @@ -119,7 +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,
.n_voltages = 256 * ARRAY_SIZE(tps6287x_voltage_ranges),
.linear_ranges = tps6287x_voltage_ranges,
.n_linear_ranges = ARRAY_SIZE(tps6287x_voltage_ranges),
.linear_range_selectors = tps6287x_voltage_range_sel,
Expand Down

0 comments on commit 2d2b4d0

Please sign in to comment.