summaryrefslogtreecommitdiff
path: root/include/linux/scmi_protocol.h
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2021-03-16 12:48:45 +0000
committerSudeep Holla <sudeep.holla@arm.com>2021-03-30 16:34:54 +0100
commit7e029344223824dbf21e759bf9c0d08f633edb16 (patch)
tree7b3ed49206f6aabd2ebbf6ca8ebf21d3c1601bd7 /include/linux/scmi_protocol.h
parent137e68659e90b242049bfd1fab2700bbcf476140 (diff)
firmware: arm_scmi: Port reset protocol to new protocols interface
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->reset_ops still around to ease transition. Remove handle->reset_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-21-cristian.marussi@arm.com Tested-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/scmi_protocol.h')
-rw-r--r--include/linux/scmi_protocol.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index e2291b7787f8..234b03a3f038 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -464,7 +464,7 @@ struct scmi_sensor_ops {
};
/**
- * struct scmi_reset_ops - represents the various operations provided
+ * struct scmi_reset_proto_ops - represents the various operations provided
* by SCMI Reset Protocol
*
* @num_domains_get: get the count of reset domains provided by SCMI
@@ -474,6 +474,15 @@ struct scmi_sensor_ops {
* @assert: explicitly assert reset signal of the specified reset domain
* @deassert: explicitly deassert reset signal of the specified reset domain
*/
+struct scmi_reset_proto_ops {
+ int (*num_domains_get)(const struct scmi_protocol_handle *ph);
+ char *(*name_get)(const struct scmi_protocol_handle *ph, u32 domain);
+ int (*latency_get)(const struct scmi_protocol_handle *ph, u32 domain);
+ int (*reset)(const struct scmi_protocol_handle *ph, u32 domain);
+ int (*assert)(const struct scmi_protocol_handle *ph, u32 domain);
+ int (*deassert)(const struct scmi_protocol_handle *ph, u32 domain);
+};
+
struct scmi_reset_ops {
int (*num_domains_get)(const struct scmi_handle *handle);
char *(*name_get)(const struct scmi_handle *handle, u32 domain);
@@ -614,8 +623,6 @@ struct scmi_notify_ops {
* @notify_ops: pointer to set of notifications related operations
* @sensor_priv: pointer to private data structure specific to sensors
* protocol(for internal use only)
- * @reset_priv: pointer to private data structure specific to reset
- * protocol(for internal use only)
* @voltage_priv: pointer to private data structure specific to voltage
* protocol(for internal use only)
* @notify_priv: pointer to private data structure specific to notifications
@@ -636,7 +643,6 @@ struct scmi_handle {
const struct scmi_notify_ops *notify_ops;
/* for protocol internal use */
void *sensor_priv;
- void *reset_priv;
void *voltage_priv;
void *notify_priv;
void *system_priv;