@@ -24,6 +24,7 @@
#include <linux/pm_opp.h>
#include <linux/of.h>
#include <linux/export.h>
+#include <linux/opp-modifier.h>
/*
* Internal data structure organization with the OPP layer library is as
@@ -629,6 +630,13 @@ int dev_pm_opp_init_cpufreq_table(struct device *dev,
struct dev_pm_opp *opp;
struct cpufreq_frequency_table *freq_table;
int i = 0;
+ int ret;
+
+ ret = opp_modify_dev_table(dev);
+ if (ret) {
+ pr_err("failed to modify OPP table: %d\n", ret);
+ return ret;
+ }
/* Pretend as if I am an updater */
mutex_lock(&dev_opp_list_lock);
Add a hook inside opp_init_cpufreq_table to allow all cpufreq drivers to utilize OPP modifier functionality. Hook will return success if no phandle is present for devices that do not use opp-modifier. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> --- drivers/base/power/opp.c | 8 ++++++++ 1 file changed, 8 insertions(+)