aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/rpmh-rsc.c
diff options
context:
space:
mode:
authorLina Iyer <ilina@codeaurora.org>2018-06-20 18:57:06 +0530
committerAndy Gross <andy.gross@linaro.org>2018-07-21 13:33:36 -0500
commitc8790cb6da58d3fa09dfa707aa486fe6769c23bc (patch)
tree4d0f9977301a4fd5964f07a589c2dc2e1f067f93 /drivers/soc/qcom/rpmh-rsc.c
parentdrivers: qcom: rpmh: allow requests to be sent asynchronously (diff)
downloadlinux-dev-c8790cb6da58d3fa09dfa707aa486fe6769c23bc.tar.xz
linux-dev-c8790cb6da58d3fa09dfa707aa486fe6769c23bc.zip
drivers: qcom: rpmh: add support for batch RPMH request
Platform drivers need make a lot of resource state requests at the same time, say, at the start or end of an usecase. It can be quite inefficient to send each request separately. Instead they can give the RPMH library a batch of requests to be sent and wait on the whole transaction to be complete. rpmh_write_batch() is a blocking call that can be used to send multiple RPMH command sets. Each RPMH command set is set asynchronously and the API blocks until all the command sets are complete and receive their tx_done callbacks. Signed-off-by: Lina Iyer <ilina@codeaurora.org> Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index 5d0dd0581904..4c0c1f24911a 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -636,6 +636,7 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
spin_lock_init(&drv->client.cache_lock);
INIT_LIST_HEAD(&drv->client.cache);
+ INIT_LIST_HEAD(&drv->client.batch_cache);
dev_set_drvdata(&pdev->dev, drv);