From: Eduardo Valentin <edubezval@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: tianyu.lan@intel.com, linux-pm@vger.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH] Thermal/int3403: Fix thermal hysteresis unit conversion
Date: Tue, 4 Nov 2014 19:31:01 -0400 [thread overview]
Message-ID: <20141104233059.GA5243@developer> (raw)
In-Reply-To: <1415065834.22344.1.camel@rzhang1-toshiba>
[-- Attachment #1: Type: text/plain, Size: 1896 bytes --]
Rui,
On Tue, Nov 04, 2014 at 09:50:34AM +0800, Zhang Rui wrote:
> On 一, 2014-11-03 at 01:53 -0800, Srinivas Pandruvada wrote:
> > From: "lan,Tianyu" <tianyu.lan@intel.com>
> >
> > Thermal hysteresis represents a temperature difference.
> > But the original code treats it as a temperature value,
> > Convert it from tenths of degree Kelvin to Milli-Celsius
> > by deducing 273200. This is not right.
> >
> > Kelvin and Celsius have same degree size. From temperature
> > difference view, the conversion between tenths of degree
> > Kelvin unit and Milli-Celsius unit is just to multiply 100.
> >
> > Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> > Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > Signed-off-by: Zhang Rui <rui.zhang@intel.com>
>
> Hi, Eduardo,
>
> can you please queue this patch for 3.18-rc5?
>
Pulled into my -fixes queue. Thanks.
> thanks,
> rui
> > ---
> > drivers/thermal/int340x_thermal/int3403_thermal.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/int340x_thermal/int3403_thermal.c
> > index d20dba9..6e9fb62 100644
> > --- a/drivers/thermal/int340x_thermal/int3403_thermal.c
> > +++ b/drivers/thermal/int340x_thermal/int3403_thermal.c
> > @@ -92,7 +92,13 @@ static int sys_get_trip_hyst(struct thermal_zone_device *tzone,
> > if (ACPI_FAILURE(status))
> > return -EIO;
> >
> > - *temp = DECI_KELVIN_TO_MILLI_CELSIUS(hyst, KELVIN_OFFSET);
> > + /*
> > + * Thermal hysteresis represents a temperature difference.
> > + * Kelvin and Celsius have same degree size. So the
> > + * conversion here between tenths of degree Kelvin unit
> > + * and Milli-Celsius unit is just to multiply 100.
> > + */
> > + *temp = hyst * 100;
> >
> > return 0;
> > }
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-11-04 23:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 9:53 [PATCH] Thermal/int3403: Fix thermal hysteresis unit conversion Srinivas Pandruvada
2014-11-04 1:50 ` Zhang Rui
2014-11-04 23:31 ` Eduardo Valentin [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-03 6:04 Lan Tianyu
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=20141104233059.GA5243@developer \
--to=edubezval@gmail.com \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=tianyu.lan@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.