drivers: qcom: rpmh: cache sleep/wake state requests
authorLina Iyer <ilina@codeaurora.org>
Wed, 20 Jun 2018 13:27:04 +0000 (18:57 +0530)
committerAndy Gross <andy.gross@linaro.org>
Sat, 21 Jul 2018 18:33:12 +0000 (13:33 -0500)
commit600513dfeef33cb05c694d1b13d319b9e8cde536
tree24b315e925e86066d7c95ad9aaedef334e55f790
parent9a3afcfbc0cc9af5e18ff53bb0d41a30e0d3d896
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>
drivers/soc/qcom/rpmh-internal.h
drivers/soc/qcom/rpmh-rsc.c
drivers/soc/qcom/rpmh.c
include/soc/qcom/rpmh.h