[<prev] [next>] [day] [month] [year] [list]
Message-Id: <E1akoEz-0007KW-58@finisterre>
Date: Tue, 29 Mar 2016 00:39:05 -0700
From: Mark Brown <broonie@...nel.org>
To: Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Applied "regulator: twl: Regulator mode should not depend on regulator enabled state" to the regulator tree
The patch
regulator: twl: Regulator mode should not depend on regulator enabled state
has been applied to the regulator tree at
git://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 32e5deac3627a508f43806788dafa933b51d5d46 Mon Sep 17 00:00:00 2001
From: Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>
Date: Sat, 26 Mar 2016 10:28:15 +0200
Subject: [PATCH] regulator: twl: Regulator mode should not depend on regulator
enabled state
When machine constraints are applied, regulator framework first sets
initial mode (if any) and then enables the regulator if needed. The current
code in twl4030reg_set_mode always checks if the regulator is enabled
before applying the mode. That results in -EACCES error returned for
"always-on" regulators which have "initial-mode" set in the board DTS. Fix
that by removing the unneeded check.
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
drivers/regulator/twl-regulator.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index aad748b00e1a..7355616194ab 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -371,7 +371,6 @@ static int twl4030reg_set_mode(struct regulator_dev *rdev, unsigned mode)
{
struct twlreg_info *info = rdev_get_drvdata(rdev);
unsigned message;
- int status;
/* We can only set the mode through state machine commands... */
switch (mode) {
@@ -385,13 +384,6 @@ static int twl4030reg_set_mode(struct regulator_dev *rdev, unsigned mode)
return -EINVAL;
}
- /* Ensure the resource is associated with some group */
- status = twlreg_grp(rdev);
- if (status < 0)
- return status;
- if (!(status & (P3_GRP_4030 | P2_GRP_4030 | P1_GRP_4030)))
- return -EACCES;
-
return twl4030_send_pb_msg(message);
}
--
2.8.0.rc3
Powered by blists - more mailing lists