summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorTirupathi Reddy <tirupath@codeaurora.org>2016-03-09 17:00:16 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-25 16:03:36 -0700
commit5f00b0c8fea725e0f0b34f91a0092f3c372ec8f5 (patch)
tree4f77966c6301471a10f69416684b85f6d796816e /drivers/regulator
parent6eea801d0bf14513eabd9f6c7fbb2bea046774a5 (diff)
regulator: cpr3-regulator: remove ceiling interrupt for CPR4 controllers
For CPR4 controllers, SW does not perform any specific operation upon receiving ceiling interrupt. Do not configure ceiling interrupt for CPR4 controllers. CRs-Fixed: 987525 Change-Id: I467ff12ad8d58036a64928249d4e5671eb8ec6b5 Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/cpr3-regulator.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/drivers/regulator/cpr3-regulator.c b/drivers/regulator/cpr3-regulator.c
index 309ec4c1e745..087b6a8364f8 100644
--- a/drivers/regulator/cpr3-regulator.c
+++ b/drivers/regulator/cpr3-regulator.c
@@ -1481,10 +1481,13 @@ static int cpr3_regulator_init_ctrl(struct cpr3_controller *ctrl)
return rc;
}
- rc = msm_spm_avs_enable_irq(0, MSM_SPM_AVS_IRQ_MAX);
- if (rc) {
- cpr3_err(ctrl, "could not enable max IRQ, rc=%d\n", rc);
- return rc;
+ if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) {
+ rc = msm_spm_avs_enable_irq(0, MSM_SPM_AVS_IRQ_MAX);
+ if (rc) {
+ cpr3_err(ctrl, "could not enable max IRQ, rc=%d\n",
+ rc);
+ return rc;
+ }
}
}
@@ -5845,10 +5848,13 @@ int cpr3_regulator_register(struct platform_device *pdev,
return rc;
}
- ctrl->ceiling_irq = platform_get_irq_byname(pdev, "ceiling");
- if (ctrl->ceiling_irq < 0) {
- cpr3_err(ctrl, "missing ceiling interrupt\n");
- return ctrl->ceiling_irq;
+ if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) {
+ ctrl->ceiling_irq = platform_get_irq_byname(pdev,
+ "ceiling");
+ if (ctrl->ceiling_irq < 0) {
+ cpr3_err(ctrl, "missing ceiling interrupt\n");
+ return ctrl->ceiling_irq;
+ }
}
}
@@ -5912,7 +5918,7 @@ int cpr3_regulator_register(struct platform_device *pdev,
}
if (ctrl->supports_hw_closed_loop &&
- ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) {
+ ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) {
rc = devm_request_threaded_irq(dev, ctrl->ceiling_irq, NULL,
cpr3_ceiling_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_RISING,
@@ -5966,10 +5972,13 @@ int cpr3_regulator_unregister(struct cpr3_controller *ctrl)
cpr3_closed_loop_disable(ctrl);
- if (ctrl->use_hw_closed_loop ||
- ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) {
+ if ((ctrl->use_hw_closed_loop
+ || ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4)
+ && ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) {
regulator_disable(ctrl->vdd_limit_regulator);
- msm_spm_avs_disable_irq(0, MSM_SPM_AVS_IRQ_MAX);
+
+ if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3)
+ msm_spm_avs_disable_irq(0, MSM_SPM_AVS_IRQ_MAX);
}
for (i = 0; i < ctrl->thread_count; i++)