]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting
authorAxel Lin <axel.lin@ingics.com>
Sun, 23 May 2021 07:10:44 +0000 (15:10 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:27:40 +0000 (19:27 +0200)
commitfa6df6b6f438ad18a42d0294468ea5f93d7f8d8c
tree402ce4f0d2eb37acbc678611ef2cc01f2c5d0c67
parent98a331814f53c1bc8928adfb7143e2a930cbe4de
regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting

BugLink: https://bugs.launchpad.net/bugs/1934179
[ Upstream commit 0514582a1a5b4ac1a3fd64792826d392d7ae9ddc ]

The valid selectors for bd70528 bucks are 0 ~ 0xf, so the .n_voltages
should be 16 (0x10). Use 0x10 to make it consistent with BD70528_LDO_VOLTS.
Also remove redundant defines for BD70528_BUCK_VOLTS.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20210523071045.2168904-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/mfd/rohm-bd70528.h