summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTirupathi Reddy <tirupath@codeaurora.org>2017-03-10 15:55:59 +0530
committerTirupathi Reddy <tirupath@codeaurora.org>2017-03-13 10:07:25 +0530
commitf02b26a72917ab3df7c12c75baf955c7c58b81b4 (patch)
tree5e91428c56e4b1729b1260f100edccb701860b6c
parent51740526b9b90ef772ba2c3c6b288f0d1688bb10 (diff)
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. CRs-Fixed: 2018399 Change-Id: I24cc880d6a61c2cb489897d39a1b63199749c98d Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
-rw-r--r--drivers/regulator/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index a878dc6a97db..88a5c497d5ed 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2931,7 +2931,8 @@ static int regulator_set_voltage_unlocked(struct regulator *regulator,
goto out2;
if (rdev->supply && (rdev->desc->min_dropout_uV ||
- !rdev->desc->ops->get_voltage)) {
+ !(rdev->desc->ops->get_voltage ||
+ rdev->desc->ops->get_voltage_sel))) {
int current_supply_uV;
int selector;