From: Viresh Kumar <viresh.kumar@linaro.org>
To: Javi Merino <javi.merino@arm.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
cw00.choi@samsung.com, rufus.hamade@imgtec.com,
edubezval@gmail.com, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH v5 2/5] PM / OPP: get the voltage for all OPPs
Date: Thu, 27 Aug 2015 16:28:11 +0530 [thread overview]
Message-ID: <20150827105811.GV8784@linux> (raw)
In-Reply-To: <1440672951-7002-3-git-send-email-javi.merino@arm.com>
On 27-08-15, 11:55, Javi Merino wrote:
> The OPP library is now used for power models to calculate the power
> that a device would consume at a specific OPP. To do that, we use a
> simple power model which takes frequency and voltage as inputs. We get
> the voltage and frequency from the OPP library.
>
> The devfreq cooling device for the thermal framework controls
> temperature by disabling OPPs. The power model needs to calculate the
> power that would be consumed if we reenabled the OPP. Therefore, let
> dev_pm_opp_get_voltage() work for disabled OPPs.
>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Javi Merino <javi.merino@arm.com>
> ---
> drivers/base/power/opp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index 677fb2843553..3e5f7ae29ef9 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> @@ -150,7 +150,7 @@ static struct device_opp *_find_device_opp(struct device *dev)
> }
>
> /**
> - * dev_pm_opp_get_voltage() - Gets the voltage corresponding to an available opp
> + * dev_pm_opp_get_voltage() - Gets the voltage corresponding to an opp
> * @opp: opp for which voltage has to be returned for
> *
> * Return: voltage in micro volt corresponding to the opp, else
> @@ -172,7 +172,7 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
> opp_rcu_lockdep_assert();
>
> tmp_opp = rcu_dereference(opp);
> - if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
> + if (unlikely(IS_ERR_OR_NULL(tmp_opp)))
> pr_err("%s: Invalid parameters\n", __func__);
> else
> v = tmp_opp->u_volt;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
next prev parent reply other threads:[~2015-08-27 10:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 10:55 [PATCH v5 0/5] Devfreq cooling device Javi Merino
2015-08-27 10:55 ` [PATCH v5 1/5] PM / devfreq: cache the last call to get_dev_status() Javi Merino
2015-08-27 10:55 ` [PATCH v5 2/5] PM / OPP: get the voltage for all OPPs Javi Merino
2015-08-27 10:58 ` Viresh Kumar [this message]
2015-08-27 10:55 ` [PATCH v5 3/5] thermal: Add devfreq cooling Javi Merino
2015-09-09 5:10 ` Eduardo Valentin
2015-09-09 17:38 ` Javi Merino
2015-08-27 10:55 ` [PATCH v5 4/5] devfreq_cooling: add trace information Javi Merino
2015-08-27 10:55 ` [PATCH v5 5/5] PM / devfreq: drop comment about thermal setting max_freq Javi Merino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150827105811.GV8784@linux \
--to=viresh.kumar@linaro.org \
--cc=cw00.choi@samsung.com \
--cc=edubezval@gmail.com \
--cc=javi.merino@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rufus.hamade@imgtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).