summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/rpmh-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/qcom/rpmh-internal.h')
-rw-r--r--drivers/soc/qcom/rpmh-internal.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h
index cc29176f1303..1e687f719301 100644
--- a/drivers/soc/qcom/rpmh-internal.h
+++ b/drivers/soc/qcom/rpmh-internal.h
@@ -42,6 +42,32 @@ struct tcs_group {
};
/**
+ * struct rpmh_request: the message to be sent to rpmh-rsc
+ *
+ * @msg: the request
+ * @cmd: the payload that will be part of the @msg
+ * @completion: triggered when request is done
+ * @dev: the device making the request
+ * @err: err return from the controller
+ */
+struct rpmh_request {
+ struct tcs_request msg;
+ struct tcs_cmd cmd[MAX_RPMH_PAYLOAD];
+ struct completion *completion;
+ const struct device *dev;
+ int err;
+};
+
+/**
+ * struct rpmh_ctrlr: our representation of the controller
+ *
+ * @drv: the controller instance
+ */
+struct rpmh_ctrlr {
+ struct rsc_drv *drv;
+};
+
+/**
* struct rsc_drv: the Direct Resource Voter (DRV) of the
* Resource State Coordinator controller (RSC)
*
@@ -52,6 +78,7 @@ struct tcs_group {
* @tcs: TCS groups
* @tcs_in_use: s/w state of the TCS
* @lock: synchronize state of the controller
+ * @client: handle to the DRV's client.
*/
struct rsc_drv {
const char *name;
@@ -61,9 +88,11 @@ struct rsc_drv {
struct tcs_group tcs[TCS_TYPE_NR];
DECLARE_BITMAP(tcs_in_use, MAX_TCS_NR);
spinlock_t lock;
+ struct rpmh_ctrlr client;
};
-
int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg);
+void rpmh_tx_done(const struct tcs_request *msg, int r);
+
#endif /* __RPM_INTERNAL_H__ */
OpenPOWER on IntegriCloud