diff mbox

[RFC,v1,3/3] regulator: qcom_smd: add linear range to pm8941 lnldo

Message ID 1464862996-3147-4-git-send-email-srinivas.kandagatla@linaro.org
State New
Headers show

Commit Message

Srinivas Kandagatla June 2, 2016, 10:23 a.m. UTC
This patch converts a fixed voltage pm8941 lnldo to a single step
linear range regulator, so that we could use the same list_volatage
callback without BUG_ON from regulator core.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

---
 drivers/regulator/qcom_smd-regulator.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.8.2
diff mbox

Patch

diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index b11b627..09c688d 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -246,7 +246,10 @@  static const struct regulator_desc pm8941_nldo = {
 };
 
 static const struct regulator_desc pm8941_lnldo = {
-	.fixed_uV = 1740000,
+	.linear_ranges = (struct regulator_linear_range[]) {
+		REGULATOR_LINEAR_RANGE(1740000, 0, 0, 1740000),
+	},
+	.n_linear_ranges = 1,
 	.n_voltages = 1,
 	.ops = &rpm_smps_ldo_ops,
 };