[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190219155033.BC58F11284CD@debutante.sirena.org.uk>
Date: Tue, 19 Feb 2019 15:50:33 +0000 (GMT)
From: Mark Brown <broonie@...nel.org>
To: Axel Lin <axel.lin@...ics.com>
Cc: Steve Twiss <stwiss.opensource@...semi.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org
Subject: Applied "regulator: da9062: Select maximum current in specific range for set_current_limit" to the regulator tree
The patch
regulator: da9062: Select maximum current in specific range for set_current_limit
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
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
>From 13a345d6fd4f6df3059c51f54a4beca48a12fb42 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@...ics.com>
Date: Tue, 19 Feb 2019 21:31:00 +0800
Subject: [PATCH] regulator: da9062: Select maximum current in specific range
for set_current_limit
Selecting the minimal value is only true for voltage regulators.
For current regulators the maximum in the given range should be
selected instead.
Signed-off-by: Axel Lin <axel.lin@...ics.com>
Acked-by: Steve Twiss <stwiss.opensource@...semi.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
drivers/regulator/da9062-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
index d06e9600fa18..4c5d6ad853f8 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -126,7 +126,7 @@ static int da9062_set_current_limit(struct regulator_dev *rdev,
const struct da9062_regulator_info *rinfo = regl->info;
int n, tval;
- for (n = 0; n < rinfo->n_current_limits; n++) {
+ for (n = rinfo->n_current_limits - 1; n >= 0; n--) {
tval = rinfo->current_limits[n];
if (tval >= min_ua && tval <= max_ua)
return regmap_field_write(regl->ilimit, n);
--
2.20.1
Powered by blists - more mailing lists