From: Alison Schofield <amsfield22@gmail.com>
To: "De Vos, Bart (EXT - BE/Antwerp)" <bart.de_vos.ext@nokia.com>
Cc: matt.ranostay@konsulko.com, linux-iio@vger.kernel.org
Subject: Re: hdc100x driver backport
Date: Mon, 20 Mar 2017 12:23:20 -0700 [thread overview]
Message-ID: <20170320192319.GA4543@d830.WORKGROUP> (raw)
In-Reply-To: <AMSPR07MB129D24949977B4D40F31C338F3A0@AMSPR07MB129.eurprd07.prod.outlook.com>
On Mon, Mar 20, 2017 at 04:54:07PM +0000, De Vos, Bart (EXT - BE/Antwerp) wrote:
> Hi,
>
> I'm trying to backport the hdc100x driver to v3.10.
>
> Can you elaborate on the temperature offset, especially here:
> http://lxr.linux.no/linux+v4.10/drivers/iio/humidity/hdc100x.c#L239
>
> I see the goal is to have millidegrees, and as such I would expect an offset of -40000. I don't understand the numbers used here and the relationship between the two.
> If I read out the offset in runtime I got the value specified to 'val' on line 240.
>
> Thanks for your feedback.
>
> Kr,
> Bart.
Hi Bart,
Copying Matt Ranostay as he is the author/expert on this driver.
hdc100x temperature is calculated as:
(raw + offset) * scale / 1000
Here's a sample reading:
raw: 25443 scale: 2.517700195 offset: -15887.515151 resolution: 0.006350
Temperature 24057.846068
Hope that helps,
alisons
parent reply other threads:[~2017-03-20 19:23 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <AMSPR07MB129D24949977B4D40F31C338F3A0@AMSPR07MB129.eurprd07.prod.outlook.com>]
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=20170320192319.GA4543@d830.WORKGROUP \
--to=amsfield22@gmail.com \
--cc=bart.de_vos.ext@nokia.com \
--cc=linux-iio@vger.kernel.org \
--cc=matt.ranostay@konsulko.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