From: Guenter Roeck <linux@roeck-us.net>
To: Tim Harvey <tharvey@gateworks.com>
Cc: Jean Delvare <jdelvare@suse.com>,
Robert Jones <rjones@gateworks.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] hwmon: gsc-hwmon: scale temperature to millidegrees
Date: Thu, 27 Aug 2020 12:48:48 -0700 [thread overview]
Message-ID: <20200827194848.GA232549@roeck-us.net> (raw)
In-Reply-To: <1598548824-16898-1-git-send-email-tharvey@gateworks.com>
On Thu, Aug 27, 2020 at 10:20:24AM -0700, Tim Harvey wrote:
> The GSC registers report temperature in decidegrees celcius so we
> need to scale it to represent the hwmon sysfs API of millidegrees.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/gsc-hwmon.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
> index 3dfe2ca..c6d4567 100644
> --- a/drivers/hwmon/gsc-hwmon.c
> +++ b/drivers/hwmon/gsc-hwmon.c
> @@ -172,6 +172,7 @@ gsc_hwmon_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
> case mode_temperature:
> if (tmp > 0x8000)
> tmp -= 0xffff;
> + tmp *= 100; /* convert to millidegrees celsius */
> break;
> case mode_voltage_raw:
> tmp = clamp_val(tmp, 0, BIT(GSC_HWMON_RESOLUTION));
prev parent reply other threads:[~2020-08-27 19:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:20 [PATCH] hwmon: gsc-hwmon: scale temperature to millidegrees Tim Harvey
2020-08-27 19:48 ` Guenter Roeck [this message]
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=20200827194848.GA232549@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjones@gateworks.com \
--cc=stable@vger.kernel.org \
--cc=tharvey@gateworks.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