summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2026-05-08 18:33:00 +0300
committerSudeep Holla <sudeep.holla@kernel.org>2026-05-12 17:29:12 +0300
commitd2488ff1a257342111e1be1348d52e8b4ecfaa36 (patch)
treed05b4310533ec2173ef388f7cab773aaa2932412 /include/linux
parent4a07036d615976354ac806017f23ea800f1fc489 (diff)
downloadlinux-d2488ff1a257342111e1be1348d52e8b4ecfaa36.tar.xz
firmware: arm_scmi: Introduce all_rates_get clock operation
Add a clock operation to get the whole set of rates available to a specific clock: when needed this request could transparently trigger a full rate discovery enumeration if this specific clock-rates were previously only lazily enumerated. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Link: https://patch.msgid.link/20260508153300.2224715-16-cristian.marussi@arm.com Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/scmi_protocol.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 55db9ba8fac3..5ab73b1ab9aa 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -40,6 +40,12 @@ struct scmi_base_info {
char sub_vendor_id[SCMI_SHORT_NAME_MAX_SIZE];
};
+struct scmi_clock_rates {
+ bool rate_discrete;
+ unsigned int num_rates;
+ u64 *rates;
+};
+
struct scmi_clock_info {
char name[SCMI_MAX_STR_SIZE];
unsigned int enable_latency;
@@ -84,6 +90,7 @@ enum scmi_clock_oem_config {
* clock calculating the closest allowed rate.
* Note that @rate is an input/output parameter used both to
* describe the requested rate and report the closest match
+ * @all_rates_get: get the list of all available rates for the specified clock.
* @enable: enables the specified clock
* @disable: disables the specified clock
* @state_get: get the status of the specified clock
@@ -103,6 +110,8 @@ struct scmi_clk_proto_ops {
u64 rate);
int (*determine_rate)(const struct scmi_protocol_handle *ph, u32 clk_id,
unsigned long *rate);
+ const struct scmi_clock_rates __must_check *(*all_rates_get)
+ (const struct scmi_protocol_handle *ph, u32 clk_id);
int (*enable)(const struct scmi_protocol_handle *ph, u32 clk_id,
bool atomic);
int (*disable)(const struct scmi_protocol_handle *ph, u32 clk_id,