• Viresh Kumar's avatar
    OPP: Simplify the over-designed pstate <-> level dance · 7c41cdcd
    Viresh Kumar authored
    While adding support for "performance states" in the OPP and genpd core,
    it was decided to set the `pstate` field via genpd's
    pm_genpd_opp_to_performance_state() helper, to allow platforms to set
    `pstate` even if they don't have a corresponding `level` field in the DT
    OPP tables (More details are present in commit 6e41766a ("PM /
    Domain: Implement of_genpd_opp_to_performance_state()")).
    
    Revisiting that five years later clearly suggests that it was
    over-designed as all current users are eventually using the `level`
    value only.
    
    The previous commit already added necessary checks to make sure pstate
    is only used for genpd tables. Lets now simplify this a little, and use
    `level` directly and remove `pstate` field altogether.
    Suggested-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    7c41cdcd
of.c 39.3 KB