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 <[email protected]>
Fixes: 1aad39001e85 ("regulator: Support ROHM BD71815 regulators")
---
drivers/regulator/bd71815-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c
index 26192d55a685..79fbb45297f6 100644
--- a/drivers/regulator/bd71815-regulator.c
+++ b/drivers/regulator/bd71815-regulator.c
@@ -256,7 +256,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)
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
--
2.45.2
Hi Kalle,
Thanks for finding and fixing this!
On 6/12/24 14:42, Kalle Niemi wrote:
> 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 <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
> Fixes: 1aad39001e85 ("regulator: Support ROHM BD71815 regulators")
> ---
> drivers/regulator/bd71815-regulator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c
> index 26192d55a685..79fbb45297f6 100644
> --- a/drivers/regulator/bd71815-regulator.c
> +++ b/drivers/regulator/bd71815-regulator.c
> @@ -256,7 +256,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)
>
> base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
On Wed, 12 Jun 2024 14:42:34 +0300, Kalle Niemi wrote:
> 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.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: bd71815: fix ramp values
commit: 4cac29b846f38d5f0654cdfff5c5bfc37305081c
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