regulator: core: Fix voltage change propagations to supply regulators
PATCH 1/1 regulator: core: Fix voltage change propagations to supply regulators
Some regulators support get_voltage and some support get_voltage_sel operations. Do voltage change propagation only when the current regulator has a minimum dropout voltage specified or if the current regulator lacks both get_voltage and get_voltage_sel operations.
--- drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/core.c +2 -1
@@ -2938,7 +2938,8 @@ static int regulator_set_voltage_unlocked(struct regulator *regulator,if (rdev->supply &®ulator_ops_is_valid (rdev->supply->rdev,REGULATOR_CHANGE_VOLTAGE ) && - (rdev->desc->min_dropout_uV || !rdev->desc->ops->get_voltage)) { + (rdev->desc->min_dropout_uV || !(rdev->desc->ops->get_voltage || + rdev->desc->ops->get_voltage_sel))) {int current_supply_uV;int selector;
Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Mark,
Could you please take a look and provide any feedback.
Thanks
Tirupathi Reddy
Quoted 24 lines · Tirupathi Reddy
Some regulators support
get_voltageand some supportget_voltage_seloperations. Do voltage change propagation only when the current regulator has a minimum dropout voltage specified or if the current regulator lacks bothget_voltageandget_voltage_seloperations.Signed-off-by Tirupathi Reddy <[email protected]>--- drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/regulator/core.c +2
-1@@ -2938,7 +2938,8 @@ static int regulator_set_voltage_unlocked(struct regulator *regulator,if (rdev->supply &®ulator_ops_is_valid (rdev->supply->rdev,REGULATOR_CHANGE_VOLTAGE ) && - (rdev->desc->min_dropout_uV || !rdev->desc->ops->get_voltage)) { + (rdev->desc->min_dropout_uV || !(rdev->desc->ops->get_voltage || + rdev->desc->ops->get_voltage_sel))) {int current_supply_uV;int selector;
Mark Brown
maintainerQuoted 3 lines · Tirupathi Reddy T
Mark,
Could you please take a look and provide any feedback.
Please don't top post, reply in line with needed context. This allows readers to readily follow the flow of conversation and understand what you are talking about and also helps ensure that everything in the discussion is being addressed.
Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed.
Sending content free pings adds to the mail volume (if they are seen at all) which is often the problem and since they can't be reviewed directly if something has gone wrong you'll have to resend the patches anyway, though there are some other maintainers who like them - if in doubt look at how patches for the subsystem are normally handled.
Mark Brown
maintainerApplied "regulator: core: Fix voltage change propagations to supply regulators" to the regulator tree
In reply to Tirupathi ReddyThe patch
regulator: core: Fix voltage change propagations to supply regulators
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
Quoted 1 line
From
2c2874b191d54fbf9216524e629558eee89e1d20Mon Sep 17 00:00:00 2001
From: Tirupathi Reddy <[email protected]>
Date: Thu, 25 May 2017 15:33:17 +0530
Subject: [PATCH] regulator: core: Fix voltage change propagations to supply
regulators
Some regulators support get_voltage() and some support get_voltage_sel() operations but currently we only propagate changes if the regulator has a get_voltage() operation. Also do this if we've got get_voltage_sel()
[Rewite commit message for clarity -- broonie]
--- drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/core.c +2 -1
@@ -2938,7 +2938,8 @@ static int regulator_set_voltage_unlocked(struct regulator *regulator,if (rdev->supply &®ulator_ops_is_valid (rdev->supply->rdev,REGULATOR_CHANGE_VOLTAGE ) && - (rdev->desc->min_dropout_uV || !rdev->desc->ops->get_voltage)) { + (rdev->desc->min_dropout_uV || !(rdev->desc->ops->get_voltage || + rdev->desc->ops->get_voltage_sel))) {int current_supply_uV;int selector;
Signature · 1 line
2.13.2