diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2023-08-25 13:26:22 +0200 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-09-21 16:24:27 +0100 |
commit | 3d99ed60721bf2e108c8fc660775766057689a92 (patch) | |
tree | e75dd0d485b1e7a0c5e6f053965553cb8334e1b5 /include/linux/scmi_protocol.h | |
parent | e9090e70e618cd62ab7bf2914511e5eea31a2535 (diff) |
firmware: arm_scmi: Extend perf protocol ops to get information of a domain
Similar to other protocol ops, it's useful for an scmi module driver to get
some generic information of a performance domain. Therefore, let's add a
new callback to provide this information. The information is currently
limited to the name of the performance domain and whether the set-level
operation is supported, although this can easily be extended if we find the
need for it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230825112633.236607-3-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/scmi_protocol.h')
-rw-r--r-- | include/linux/scmi_protocol.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 14791dd54706..9108fe8ed3e3 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -106,11 +106,17 @@ struct scmi_clk_proto_ops { u8 oem_type, u32 oem_val, bool atomic); }; +struct scmi_perf_domain_info { + char name[SCMI_MAX_STR_SIZE]; + bool set_perf; +}; + /** * struct scmi_perf_proto_ops - represents the various operations provided * by SCMI Performance Protocol * * @num_domains_get: gets the number of supported performance domains + * @info_get: get the information of a performance domain * @limits_set: sets limits on the performance level of a domain * @limits_get: gets limits on the performance level of a domain * @level_set: sets the performance level of a domain @@ -131,6 +137,8 @@ struct scmi_clk_proto_ops { */ struct scmi_perf_proto_ops { int (*num_domains_get)(const struct scmi_protocol_handle *ph); + const struct scmi_perf_domain_info __must_check *(*info_get) + (const struct scmi_protocol_handle *ph, u32 domain); int (*limits_set)(const struct scmi_protocol_handle *ph, u32 domain, u32 max_perf, u32 min_perf); int (*limits_get)(const struct scmi_protocol_handle *ph, u32 domain, |