diff mbox series

drivers: qcom: rpmh: avoid sending sleep/wake sets immediately

Message ID 1535139252-20066-1-git-send-email-rplsssn@codeaurora.org (mailing list archive)
State Accepted, archived
Delegated to: Andy Gross
Headers show
Series drivers: qcom: rpmh: avoid sending sleep/wake sets immediately | expand

Commit Message

Raju P.L.S.S.S.N Aug. 24, 2018, 7:34 p.m. UTC
Fix the redundant call being made to send the sleep and wake requests
immediately to the controller.

As per the patch[1], the sleep and wake request votes are cached in rpmh
controller and sent during rpmh_flush(). These requests needs to be sent
only during entry of deeper system low power modes or suspend.

[1]https://patchwork.kernel.org/patch/10477533/

Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
---
 drivers/soc/qcom/rpmh.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Lina Iyer Aug. 26, 2018, 2:06 a.m. UTC | #1
On Sat, Aug 25 2018 at 13:34 -0600, Raju P.L.S.S.S.N wrote:
>Fix the redundant call being made to send the sleep and wake requests
>immediately to the controller.
>
>As per the patch[1], the sleep and wake request votes are cached in rpmh
>controller and sent during rpmh_flush(). These requests needs to be sent
>only during entry of deeper system low power modes or suspend.
>
>[1]https://patchwork.kernel.org/patch/10477533/
>
>Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
Reviewed-by: Lina Iyer <ilina@codeaurora.org>
>---
> drivers/soc/qcom/rpmh.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c
>index f81488b..390e779 100644
>--- a/drivers/soc/qcom/rpmh.c
>+++ b/drivers/soc/qcom/rpmh.c
>@@ -237,9 +237,8 @@ static int __rpmh_write(const struct device *dev, enum rpmh_state state,
> 		WARN_ON(irqs_disabled());
> 		ret = rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg);
> 	} else {
>-		ret = rpmh_rsc_write_ctrl_data(ctrlr_to_drv(ctrlr),
>-				&rpm_msg->msg);
> 		/* Clean up our call by spoofing tx_done */
>+		ret = 0;
> 		rpmh_tx_done(&rpm_msg->msg, ret);
> 	}
>
>--
>QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation.
>
diff mbox series

Patch

diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c
index f81488b..390e779 100644
--- a/drivers/soc/qcom/rpmh.c
+++ b/drivers/soc/qcom/rpmh.c
@@ -237,9 +237,8 @@  static int __rpmh_write(const struct device *dev, enum rpmh_state state,
 		WARN_ON(irqs_disabled());
 		ret = rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg);
 	} else {
-		ret = rpmh_rsc_write_ctrl_data(ctrlr_to_drv(ctrlr),
-				&rpm_msg->msg);
 		/* Clean up our call by spoofing tx_done */
+		ret = 0;
 		rpmh_tx_done(&rpm_msg->msg, ret);
 	}