summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorKalle Niemi <kaleposti@gmail.com>2024-06-12 14:42:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-27 13:46:21 +0200
commit474a1661f46c3eae59b8855cd8cc2eafb58f1547 (patch)
treeab600a7964fa6ec05f647db4793be2909c331d45 /drivers/regulator
parent6136f19e528dc3db75c5d4fa606a26ac8c2784a5 (diff)
downloadlinux-474a1661f46c3eae59b8855cd8cc2eafb58f1547.tar.gz
linux-474a1661f46c3eae59b8855cd8cc2eafb58f1547.tar.bz2
linux-474a1661f46c3eae59b8855cd8cc2eafb58f1547.zip
regulator: bd71815: fix ramp values
[ Upstream commit 4cac29b846f38d5f0654cdfff5c5bfc37305081c ] Ramp values are inverted. This caused wrong values written to register when ramp values were defined in device tree. Invert values in table to fix this. Signed-off-by: Kalle Niemi <kaleposti@gmail.com> Fixes: 1aad39001e85 ("regulator: Support ROHM BD71815 regulators") Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/ZmmJXtuVJU6RgQAH@latitude5580 Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/bd71815-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c
index c2b8b8be7824..4696255fca5d 100644
--- a/drivers/regulator/bd71815-regulator.c
+++ b/drivers/regulator/bd71815-regulator.c
@@ -257,7 +257,7 @@ static int buck12_set_hw_dvs_levels(struct device_node *np,
* 10: 2.50mV/usec 10mV 4uS
* 11: 1.25mV/usec 10mV 8uS
*/
-static const unsigned int bd7181x_ramp_table[] = { 1250, 2500, 5000, 10000 };
+static const unsigned int bd7181x_ramp_table[] = { 10000, 5000, 2500, 1250 };
static int bd7181x_led_set_current_limit(struct regulator_dev *rdev,
int min_uA, int max_uA)