summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/rpmh-rsc.c
diff options
context:
space:
mode:
authorLina Iyer <ilina@codeaurora.org>2018-06-20 15:27:04 +0200
committerAndy Gross <andy.gross@linaro.org>2018-07-21 20:33:12 +0200
commit600513dfeef33cb05c694d1b13d319b9e8cde536 (patch)
tree24b315e925e86066d7c95ad9aaedef334e55f790 /drivers/soc/qcom/rpmh-rsc.c
parentdrivers: qcom: rpmh-rsc: allow invalidation of sleep/wake TCS (diff)
downloadlinux-600513dfeef33cb05c694d1b13d319b9e8cde536.tar.xz
linux-600513dfeef33cb05c694d1b13d319b9e8cde536.zip
drivers: qcom: rpmh: cache sleep/wake state requests
Active state requests are sent immediately to the RSC controller, while sleep and wake state requests are cached in this driver to avoid taxing the RSC controller repeatedly. The cached values will be sent to the controller when the rpmh_flush() is called. Generally, flushing is a system PM activity and may be called from the system PM drivers when the system is entering suspend or deeper sleep modes during cpuidle. Also allow invalidating the cached requests, so they may be re-populated again. Signed-off-by: Lina Iyer <ilina@codeaurora.org> [rplsssn: remove unneeded semicolon, address line over 80chars error] Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org> Reviewed-by: Evan Green <evgreen@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/soc/qcom/rpmh-rsc.c')
-rw-r--r--drivers/soc/qcom/rpmh-rsc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index fed8459c0ef6..5d0dd0581904 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -634,6 +634,9 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
/* Enable the active TCS to send requests immediately */
write_tcs_reg(drv, RSC_DRV_IRQ_ENABLE, 0, drv->tcs[ACTIVE_TCS].mask);
+ spin_lock_init(&drv->client.cache_lock);
+ INIT_LIST_HEAD(&drv->client.cache);
+
dev_set_drvdata(&pdev->dev, drv);
return devm_of_platform_populate(&pdev->dev);