summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/rpmh-internal.h
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-internal.h
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-internal.h')
-rw-r--r--drivers/soc/qcom/rpmh-internal.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h
index af4da1cb6558..101145c9db1c 100644
--- a/drivers/soc/qcom/rpmh-internal.h
+++ b/drivers/soc/qcom/rpmh-internal.h
@@ -66,10 +66,14 @@ struct rpmh_request {
/**
* struct rpmh_ctrlr: our representation of the controller
*
- * @drv: the controller instance
+ * @cache: the list of cached requests
+ * @cache_lock: synchronize access to the cache data
+ * @dirty: was the cache updated since flush
*/
struct rpmh_ctrlr {
- struct rsc_drv *drv;
+ struct list_head cache;
+ spinlock_t cache_lock;
+ bool dirty;
};
/**