OPP: OF: Export dev_opp_pm_calc_power() for usage from EM
authorLukasz Luba <lukasz.luba@arm.com>
Wed, 3 Apr 2024 15:49:04 +0000 (16:49 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Apr 2024 14:05:14 +0000 (16:05 +0200)
commite3ac0f367d5806af09d2070bb7951af2f59d1f52
tree05b300107304715a0f97eac8b9030bec0dfcd74d
parentfec50db7033ea478773b159e0e2efb135270e3b7
OPP: OF: Export dev_opp_pm_calc_power() for usage from EM

There are device drivers which can modify voltage values for OPPs. It
could be due to the chip binning and those drivers have specific chip
knowledge about it. This adjustment can happen after Energy Model is
registered, thus EM can have stale data about power.

Export dev_opp_pm_calc_power() which can be used by Energy Model to
calculate new power with the new voltage for OPPs.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/opp/of.c
include/linux/pm_opp.h