PM / Domain: Implement of_genpd_opp_to_performance_state()
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 29 Nov 2017 09:51:51 +0000 (15:21 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 9 May 2018 04:45:20 +0000 (10:15 +0530)
commit6e41766a6a504b605a105cc5ab8d276ea20052ba
tree23af704f99df7a70dd572efced4904b9f9246311
parent6a0ae73d95956f7e900eb77808a7e8bad67a684d
PM / Domain: Implement of_genpd_opp_to_performance_state()

This implements of_genpd_opp_to_performance_state() which can be used
from the device drivers or the OPP core to find the performance state
encoded in the "required-opps" property of a node. Normally this would
be called only once for each OPP of the device for which the OPP table
of the device is getting generated.

Different platforms may encode the performance state differently using
the OPP table (they may simply return value of opp-hz or opp-microvolt,
or apply some algorithm on top of those values) and so a new callback
->opp_to_performance_state() is implemented to allow platform specific
drivers to convert the power domain OPP to a performance state value.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/base/power/domain.c
include/linux/pm_domain.h