diff options
author | Lina Iyer <ilina@codeaurora.org> | 2018-06-20 15:27:05 +0200 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2018-07-21 20:33:27 +0200 |
commit | 564b5e24ccd4c840a7f84dfd952e5715dd9b3966 (patch) | |
tree | 63a2a1d5c80d7db7c0cc350f4512a0efb6f7365f /include/soc/qcom/rpmh.h | |
parent | drivers: qcom: rpmh: cache sleep/wake state requests (diff) | |
download | linux-564b5e24ccd4c840a7f84dfd952e5715dd9b3966.tar.xz linux-564b5e24ccd4c840a7f84dfd952e5715dd9b3966.zip |
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 'include/soc/qcom/rpmh.h')
-rw-r--r-- | include/soc/qcom/rpmh.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/soc/qcom/rpmh.h b/include/soc/qcom/rpmh.h index 42e62a0d26d8..1161a5c77e75 100644 --- a/include/soc/qcom/rpmh.h +++ b/include/soc/qcom/rpmh.h @@ -14,6 +14,9 @@ int rpmh_write(const struct device *dev, enum rpmh_state state, const struct tcs_cmd *cmd, u32 n); +int rpmh_write_async(const struct device *dev, enum rpmh_state state, + const struct tcs_cmd *cmd, u32 n); + int rpmh_flush(const struct device *dev); int rpmh_invalidate(const struct device *dev); @@ -24,6 +27,10 @@ static inline int rpmh_write(const struct device *dev, enum rpmh_state state, const struct tcs_cmd *cmd, u32 n) { return -ENODEV; } +static inline int rpmh_write_async(const struct device *dev, + enum rpmh_state state, + const struct tcs_cmd *cmd, u32 n) +{ return -ENODEV; } static inline int rpmh_flush(const struct device *dev) { return -ENODEV; } |