firmware: arm_scmi: add a getter for power of performance states
The SCMI protocol can be used to get power estimates from firmware corresponding to each performance state of a device. Although these power costs are already managed by the SCMI firmware driver, they are not exposed to any external subsystem yet. Fix this by adding a new get_power() interface to the exisiting perf_ops defined for the SCMI protocol. Signed-off-by: Quentin Perret <quentin.perret@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:

committed by
Sudeep Holla

parent
ca64b719a1
commit
1a63fe9a2b
@@ -91,6 +91,8 @@ struct scmi_clk_ops {
|
||||
* to sustained performance level mapping
|
||||
* @freq_get: gets the frequency for a given device using sustained frequency
|
||||
* to sustained performance level mapping
|
||||
* @est_power_get: gets the estimated power cost for a given performance domain
|
||||
* at a given frequency
|
||||
*/
|
||||
struct scmi_perf_ops {
|
||||
int (*limits_set)(const struct scmi_handle *handle, u32 domain,
|
||||
@@ -110,6 +112,8 @@ struct scmi_perf_ops {
|
||||
unsigned long rate, bool poll);
|
||||
int (*freq_get)(const struct scmi_handle *handle, u32 domain,
|
||||
unsigned long *rate, bool poll);
|
||||
int (*est_power_get)(const struct scmi_handle *handle, u32 domain,
|
||||
unsigned long *rate, unsigned long *power);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user