[lkml]   [2019]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectApplied "regulator: wm831x-isink: Select maximum current in specific range" to the regulator tree
The patch

regulator: wm831x-isink: Select maximum current in specific range

has been applied to the regulator tree at

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.


From 45aa908d9b720f9fe44100fe099d6fd5ab9f12ab Mon Sep 17 00:00:00 2001
From: Axel Lin <>
Date: Wed, 13 Mar 2019 00:33:54 +0800
Subject: [PATCH] regulator: wm831x-isink: Select maximum current in specific

.set_current_limit callback should select the current closest to max_uA.

Signed-off-by: Axel Lin <>
Acked-by: Charles Keepax <>
Signed-off-by: Mark Brown <>
drivers/regulator/wm831x-isink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 11f351191dba..5611890a724b 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -99,7 +99,7 @@ static int wm831x_isink_set_current(struct regulator_dev *rdev,
struct wm831x *wm831x = isink->wm831x;
int ret, i;

- for (i = 0; i < ARRAY_SIZE(wm831x_isinkv_values); i++) {
+ for (i = ARRAY_SIZE(wm831x_isinkv_values) - 1; i >= 0; i--) {
int val = wm831x_isinkv_values[i];
if (min_uA <= val && val <= max_uA) {
ret = wm831x_set_bits(wm831x, isink->reg,
 \ /
  Last update: 2019-03-14 16:56    [W:0.037 / U:18.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site