diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2021-08-03 16:10:23 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2021-08-05 12:23:23 +0300 |
commit | 13fba878ccdd15b1c2fdce424995744dc40eaf16 (patch) | |
tree | d7e5bb70f994ba04bb2480396c135966f12ec925 /drivers/firmware/arm_scmi/common.h | |
parent | 60625667c439e6e1945d464b6eb296d144c5cb2a (diff) | |
download | linux-13fba878ccdd15b1c2fdce424995744dc40eaf16.tar.xz |
firmware: arm_scmi: Add priv parameter to scmi_rx_callback
Add a new opaque void *priv parameter to scmi_rx_callback which can be
optionally provided by the transport layer when invoking scmi_rx_callback
and that will be passed back to the transport layer in xfer->priv.
This can be used by transports that needs to keep track of their specific
data structures together with the valid xfers.
Link: https://lore.kernel.org/r/20210803131024.40280-15-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/common.h')
-rw-r--r-- | drivers/firmware/arm_scmi/common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 024d97fbf97b..7864c21269b0 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -172,6 +172,7 @@ struct scmi_msg { * - SCMI_XFER_SENT_OK -> SCMI_XFER_DRESP_OK * (Missing synchronous response is assumed OK and ignored) * @lock: A spinlock to protect state and busy fields. + * @priv: A pointer for transport private usage. */ struct scmi_xfer { int transfer_id; @@ -192,6 +193,7 @@ struct scmi_xfer { int state; /* A lock to protect state and busy fields */ spinlock_t lock; + void *priv; }; /* @@ -417,7 +419,7 @@ extern const struct scmi_desc scmi_mailbox_desc; extern const struct scmi_desc scmi_smc_desc; #endif -void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr); +void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr, void *priv); void scmi_free_channel(struct scmi_chan_info *cinfo, struct idr *idr, int id); /* shmem related declarations */ |