From: Zhang Rui <rui.zhang@intel.com>
To: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>,
Durgadoss R <durgadoss.r@intel.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] thermal: consider emul_temperature while computing trend
Date: Thu, 13 Jun 2013 10:31:41 +0800 [thread overview]
Message-ID: <1371090701.2135.14.camel@rzhang1-mobl4> (raw)
In-Reply-To: <1369863420-21913-1-git-send-email-eduardo.valentin@ti.com>
On Wed, 2013-05-29 at 17:37 -0400, Eduardo Valentin wrote:
> In case emulated temperature is in use, using the trend
> provided by driver layer can lead to bogus situation.
> In this case, debugger user would set a temperature value,
> but the trend would be from driver computation.
>
> To avoid this situation, this patch changes the get_tz_trend()
> to consider the emulated temperature whenever that is in use.
>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
> Cc: Durgadoss R <durgadoss.r@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
patch applied.
thanks,
rui
> ---
> drivers/thermal/thermal_core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index d755440..c00dc92 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -155,7 +155,8 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
> {
> enum thermal_trend trend;
>
> - if (!tz->ops->get_trend || tz->ops->get_trend(tz, trip, &trend)) {
> + if (tz->emul_temperature || !tz->ops->get_trend ||
> + tz->ops->get_trend(tz, trip, &trend)) {
> if (tz->temperature > tz->last_temperature)
> trend = THERMAL_TREND_RAISING;
> else if (tz->temperature < tz->last_temperature)
next prev parent reply other threads:[~2013-06-13 2:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 21:37 [PATCH 1/1] thermal: consider emul_temperature while computing trend Eduardo Valentin
2013-06-13 2:31 ` Zhang Rui [this message]
2013-06-13 4:54 ` R, Durgadoss
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=1371090701.2135.14.camel@rzhang1-mobl4 \
--to=rui.zhang@intel.com \
--cc=amit.daniel@samsung.com \
--cc=durgadoss.r@intel.com \
--cc=eduardo.valentin@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/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).