[PATCH 4.7 063/141] regulator: qcom_spmi: Add support for get_mode/set_mode on switches

From: Greg Kroah-Hartman
Date: Thu Oct 06 2016 - 04:39:19 EST


4.7-stable review patch. If anyone has any objections, please let me know.

------------------

From: Stephen Boyd <stephen.boyd@xxxxxxxxxx>

commit 919163f6362ac23138d31fc8befdd52e5d7e488d upstream.

The voltage switches support mode switching, so add support for
these ops to those types of regulators.

Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
Fixes: e92a4047419c ("regulator: Add QCOM SPMI regulator driver")
Signed-off-by: Stephen Boyd <stephen.boyd@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/regulator/qcom_spmi-regulator.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -1085,6 +1085,8 @@ static struct regulator_ops spmi_vs_ops
.set_pull_down = spmi_regulator_common_set_pull_down,
.set_soft_start = spmi_regulator_common_set_soft_start,
.set_over_current_protection = spmi_regulator_vs_ocp,
+ .set_mode = spmi_regulator_common_set_mode,
+ .get_mode = spmi_regulator_common_get_mode,
};

static struct regulator_ops spmi_boost_ops = {