All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: max20411: Fix off-by-one for n_voltages setting
@ 2023-02-11 15:00 Axel Lin
  2023-02-13 14:20 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2023-02-11 15:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: Bjorn Andersson, Liam Girdwood, linux-kernel, Axel Lin

Otherwise regulator_list_voltage returns -EINVAL for MAX20411_MAX_SEL.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/max20411-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/max20411-regulator.c b/drivers/regulator/max20411-regulator.c
index e75d16048e2f..83dacb4ff173 100644
--- a/drivers/regulator/max20411-regulator.c
+++ b/drivers/regulator/max20411-regulator.c
@@ -85,7 +85,7 @@ static const struct regulator_desc max20411_desc = {
 	.min_uV = MAX20411_BASE_UV,
 	.uV_step = MAX20411_UV_STEP,
 	.linear_min_sel = MAX20411_MIN_SEL,
-	.n_voltages = MAX20411_MAX_SEL,
+	.n_voltages = MAX20411_MAX_SEL + 1,
 
 	.vsel_reg = MAX20411_VID_OFFSET,
 	.vsel_mask = MAX20411_VID_MASK,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: max20411: Fix off-by-one for n_voltages setting
  2023-02-11 15:00 [PATCH] regulator: max20411: Fix off-by-one for n_voltages setting Axel Lin
@ 2023-02-13 14:20 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-02-13 14:20 UTC (permalink / raw)
  To: Axel Lin; +Cc: Bjorn Andersson, Liam Girdwood, linux-kernel

On Sat, 11 Feb 2023 23:00:19 +0800, Axel Lin wrote:
> Otherwise regulator_list_voltage returns -EINVAL for MAX20411_MAX_SEL.
> 
> 

Applied to

   broonie/regulator.git for-next

Thanks!

[1/1] regulator: max20411: Fix off-by-one for n_voltages setting
      commit: 9d1c73191f94c79076b5f46a31b8a1e12b18bc79

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-13 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-11 15:00 [PATCH] regulator: max20411: Fix off-by-one for n_voltages setting Axel Lin
2023-02-13 14:20 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.