mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 0890aba3f364ed0764fdfa79bd77db130396e594 Mon Sep 17 00:00:00 2001
|
|
From: PRAVEENKUMAR I <ipkumar@codeaurora.org>
|
|
Date: Tue, 5 May 2020 07:57:21 +0530
|
|
Subject: [PATCH 3/6] regulator: qcom_spmi: Initialize slew rate only if
|
|
required
|
|
|
|
Initialize slew rate only if set_voltage_time_sel in ops
|
|
is defined.
|
|
|
|
Change-Id: I661c88d2f4a8f26cc85b1e2d4c8aa3170420ba6c
|
|
Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
|
|
(cherry picked from commit 608a6f171ef4017197fbe2069b5910b582923027)
|
|
Signed-off-by: Praveenkumar I <ipkumar@codeaurora.org>
|
|
|
|
Change-Id: Ida3cf3d754e1207e34a164d6d86c6e1aa109ef1e
|
|
---
|
|
drivers/regulator/qcom_spmi-regulator.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
--- a/drivers/regulator/qcom_spmi-regulator.c
|
|
+++ b/drivers/regulator/qcom_spmi-regulator.c
|
|
@@ -1610,6 +1610,13 @@ static int spmi_regulator_init_slew_rate
|
|
int step, delay, slew_rate, step_delay;
|
|
const struct spmi_voltage_range *range;
|
|
|
|
+ /*
|
|
+ * Slew rate need not be initialized if
|
|
+ * set_voltage_time_sel in the ops is not defined.
|
|
+ */
|
|
+ if (!vreg->desc.ops->set_voltage_time_sel)
|
|
+ return 0;
|
|
+
|
|
ret = spmi_vreg_read(vreg, SPMI_COMMON_REG_STEP_CTRL, ®, 1);
|
|
if (ret) {
|
|
dev_err(vreg->dev, "spmi read failed, ret=%d\n", ret);
|