[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220302074515.dqzoutfiobildiph@vireshk-i7>
Date: Wed, 2 Mar 2022 13:15:15 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Lukasz Luba <lukasz.luba@....com>
Cc: linux-kernel@...r.kernel.org, dietmar.eggemann@....com,
rafael@...nel.org, daniel.lezcano@...aro.org, nm@...com,
sboyd@...nel.org, mka@...omium.org, dianders@...omium.org,
robh+dt@...nel.org, devicetree@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v4 3/4] OPP: Add support of "opp-microwatt" for advanced
EM registration
On 01-03-22, 09:35, Lukasz Luba wrote:
> /**
> * dev_pm_opp_of_register_em() - Attempt to register an Energy Model
> * @dev : Device for which an Energy Model has to be registered
> @@ -1517,6 +1567,12 @@ int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus)
> goto failed;
> }
>
> + /* First, try to find more precised Energy Model in DT */
> + if (_of_has_opp_microwatt_property(dev)) {
> + em_cb.active_power = _get_dt_power;
You can also do (to fix the warning) this instead:
em_cb = EM_DATA_CB(_get_dt_power);
Similar for the else part.
> + goto register_em;
> + }
> +
> np = of_node_get(dev->of_node);
> if (!np) {
> ret = -EINVAL;
> @@ -1538,6 +1594,7 @@ int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus)
> goto failed;
> }
>
> +register_em:
> ret = em_dev_register_perf_domain(dev, nr_opp, &em_cb, cpus, true);
> if (ret)
> goto failed;
> --
> 2.17.1
--
viresh
Powered by blists - more mailing lists