Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214467 > unrolled thread
| Started by | Javi Merino <javi.merino@arm.com> |
|---|---|
| First post | 2015-08-27 13:00 +0200 |
| Last post | 2015-08-27 13:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v5 2/5] PM / OPP: get the voltage for all OPPs Javi Merino <javi.merino@arm.com> - 2015-08-27 13:00 +0200
Re: [PATCH v5 2/5] PM / OPP: get the voltage for all OPPs Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-27 13:00 +0200
| From | Javi Merino <javi.merino@arm.com> |
|---|---|
| Date | 2015-08-27 13:00 +0200 |
| Subject | [PATCH v5 2/5] PM / OPP: get the voltage for all OPPs |
| Message-ID | <q234t-2dn-3@gated-at.bofh.it> |
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;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2015-08-27 13:00 +0200 |
| Message-ID | <q234u-2dn-17@gated-at.bofh.it> |
| In reply to | #1214467 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web