regulator: core: Let boot-on regulators be powered off
RFC 1/1 regulator: core: Let boot-on regulators be powered off
Boot-on regulators are always kept on because their use_count value is now incremented at boot time and never cleaned.
Only increment count value for alway-on regulators. regulator_late_cleanup() is now able to power off boot-on regulators when unused.
--- drivers/regulator/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/regulator/core.c +3 -1
@@ -1403,7 +1403,9 @@ static int set_machine_constraints(struct regulator_dev *rdev,rdev_err (rdev,"failed to enable\n" );return ret; } - rdev->use_count++; + +if (rdev->constraints->always_on) + rdev->use_count++; }print_constraints (rdev);
Signature · 1 line
2.17.1
Mark Brown
maintainerApplied "regulator: core: Let boot-on regulators be powered off" to the regulator tree
The patch
regulator: core: Let boot-on regulators be powered off
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.5
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 089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b Mon Sep 17 00:00:00 2001
From: Pascal Paillet <[email protected]>
Date: Wed, 13 Nov 2019 11:27:37 +0100
Subject: [PATCH] regulator: core: Let boot-on regulators be powered off
Boot-on regulators are always kept on because their use_count value is now incremented at boot time and never cleaned.
Only increment count value for alway-on regulators. regulator_late_cleanup() is now able to power off boot-on regulators when unused.
--- drivers/regulator/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/regulator/core.c +3 -1
@@ -1403,7 +1403,9 @@ static int set_machine_constraints(struct regulator_dev *rdev,rdev_err (rdev,"failed to enable\n" );return ret; } - rdev->use_count++; + +if (rdev->constraints->always_on) + rdev->use_count++; }print_constraints (rdev);
Signature · 1 line
2.20.1