summaryrefslogtreecommitdiff
path: root/drivers/soc/qcom/rpmh-internal.h
diff options
context:
space:
mode:
authorLina Iyer <ilina@codeaurora.org>2018-06-20 16:27:05 +0300
committerAndy Gross <andy.gross@linaro.org>2018-07-21 21:33:27 +0300
commit564b5e24ccd4c840a7f84dfd952e5715dd9b3966 (patch)
tree63a2a1d5c80d7db7c0cc350f4512a0efb6f7365f /drivers/soc/qcom/rpmh-internal.h
parent600513dfeef33cb05c694d1b13d319b9e8cde536 (diff)
downloadlinux-564b5e24ccd4c840a7f84dfd952e5715dd9b3966.tar.xz
drivers: qcom: rpmh: allow requests to be sent asynchronously
Platform drivers that want to send a request but do not want to block until the RPMH request completes have now a new API - rpmh_write_async(). The API allocates memory and send the requests and returns the control back to the platform driver. The tx_done callback from the controller is handled in the context of the controller's thread and frees the allocated memory. This API allows RPMH requests from atomic contexts as well. Signed-off-by: Lina Iyer <ilina@codeaurora.org> Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h
index 101145c9db1c..6a8a4b7aeead 100644
--- a/drivers/soc/qcom/rpmh-internal.h
+++ b/drivers/soc/qcom/rpmh-internal.h
@@ -54,6 +54,7 @@ struct tcs_group {
* @completion: triggered when request is done
* @dev: the device making the request
* @err: err return from the controller
+ * @needs_free: check to free dynamically allocated request object
*/
struct rpmh_request {
struct tcs_request msg;
@@ -61,6 +62,7 @@ struct rpmh_request {
struct completion *completion;
const struct device *dev;
int err;
+ bool needs_free;
};
/**