mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
firmware: arm_scmi: Specify the performance level when adding an OPP
To enable the performance level to be used for OPPs, let's convert into using the dev_pm_opp_add_dynamic() API when creating them. This will be particularly useful for the SCMI performance domain, as shown through subsequent changes. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20230925131715.138411-9-ulf.hansson@linaro.org Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
parent
033ca4de12
commit
5a6a104193
@ -787,6 +787,7 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
|
||||
{
|
||||
int idx, ret;
|
||||
unsigned long freq;
|
||||
struct dev_pm_opp_data data = {};
|
||||
struct perf_dom_info *dom;
|
||||
|
||||
dom = scmi_perf_domain_lookup(ph, domain);
|
||||
@ -799,7 +800,10 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
|
||||
else
|
||||
freq = dom->opp[idx].indicative_freq * 1000;
|
||||
|
||||
ret = dev_pm_opp_add(dev, freq, 0);
|
||||
data.level = dom->opp[idx].perf;
|
||||
data.freq = freq;
|
||||
|
||||
ret = dev_pm_opp_add_dynamic(dev, &data);
|
||||
if (ret) {
|
||||
dev_warn(dev, "failed to add opp %luHz\n", freq);
|
||||
dev_pm_opp_remove_all_dynamic(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user