@@ -255,8 +255,42 @@ static int q6v5_regulator_enable(struct q6v5 *qproc,
return rc;
}
+static void q6v5_proxy_regulator_disable(struct q6v5 *qproc)
+{
+ int i;
+ struct reg_info *regs = qproc->proxy_regs;
+
+ for (i = 0; i < qproc->proxy_reg_count; i++) {
+ if (regs[i].uV > 0)
+ regulator_set_voltage(regs[i].reg, 0, INT_MAX);
+
+ if (regs[i].uA > 0)
+ regulator_set_load(regs[i].reg, 0);
+
+ regulator_disable(regs[i].reg);
+ }
+}
+
+static void q6v5_active_regulator_disable(struct q6v5 *qproc)
+{
+ int i;
+ struct reg_info *regs = qproc->active_regs;
+
+ for (i = 0; i < qproc->active_reg_count; i++) {
+ if (regs[i].uV > 0)
+ regulator_set_voltage(regs[i].reg, 0, INT_MAX);
+
+ if (regs[i].uA > 0)
+ regulator_set_load(regs[i].reg, 0);
+
+ regulator_disable(regs[i].reg);
+ }
+}
+
static void q6v5_regulator_disable(struct q6v5 *qproc)
{
+ q6v5_proxy_regulator_disable(qproc);
+ q6v5_active_regulator_disable(qproc);
}
static int q6v5_load(struct rproc *rproc, const struct firmware *fw)
@@ -629,7 +663,7 @@ static int q6v5_start(struct rproc *rproc)
assert_reset:
reset_control_assert(qproc->mss_restart);
disable_vdd:
- q6v5_regulator_disable(qproc);
+ q6v5_active_regulator_disable(qproc);
disable_proxy_clk:
return ret;
}
It is needed that one disable proxy regulators when handover interrupt is received from mss subsystem while on certain chip there are few regulator which are never disabled. So separating out disable interface in two separate routine. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> --- drivers/remoteproc/qcom_q6v5_pil.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)