summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorValentin Caron <[email protected]>2025-05-27 15:27:43 +0200
committerPatrice Chotard <[email protected]>2025-06-11 09:42:55 +0200
commitae7e0330ce22d580990cf40d648c809b5093b252 (patch)
treee97169e0f11c74b61316b5d37f91269a8387611e /include
parent59d00e20fced23e6463aa09db889dd548baee677 (diff)
clk: scmi: add compatibility with clock protocol 2.0
Since clock protocol 2.0, SCMI specification add an option field "clock_enable_delay" to CLOCK_ATTRIBUTES command. scmi_read_resp_from_smt() will return an error ("Buffer too small") as the message length coming from the SCMI server is not the same as expected. So implement a condition to SCMI clock protocol version to change the length of the expected message. Signed-off-by: Valentin Caron <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/scmi_protocols.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
index 9046de7e3e7..762a1032c37 100644
--- a/include/scmi_protocols.h
+++ b/include/scmi_protocols.h
@@ -783,6 +783,21 @@ struct scmi_clk_attribute_out {
};
/**
+ * struct scmi_clk_get_nb_out_v2 - Response payload for SCMI_CLOCK_ATTRIBUTES command
+ * Clock management Protocol 2.0
+ * @status: SCMI command status
+ * @attributes: clock attributes
+ * @clock_name: name of the clock
+ * @clock_enable_delay: delay incurred by the platform to enable the clock
+ */
+struct scmi_clk_attribute_out_v2 {
+ s32 status;
+ u32 attributes;
+ char clock_name[SCMI_CLOCK_NAME_LENGTH_MAX];
+ u32 clock_enable_delay;
+};
+
+/**
* struct scmi_clk_state_in - Message payload for CLOCK_CONFIG_SET command
* @clock_id: SCMI clock ID
* @attributes: Attributes of the targets clock state