From: Jonathan Cameron <jic23@kernel.org>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: linux-iio@vger.kernel.org, s.nawrocki@samsun.com,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 2/2] iio: lps331ap: Modify in_temp_scale calculation way
Date: Sat, 03 Aug 2013 19:01:08 +0100 [thread overview]
Message-ID: <51FD4564.6040109@kernel.org> (raw)
In-Reply-To: <1372760003-32090-3-git-send-email-j.anaszewski@samsung.com>
On 07/02/13 11:13, Jacek Anaszewski wrote:
> This patch modifies the way how the in_temp_scale output value is
> calculated. With this implementation it is more clear how the value
> is obtained.
>
> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
The fix (patch 1) has worked it's way through now to IIOs upstream so
this patch has now been added to the togreg branch of iio.git.
Thanks,
Jonathan
> ---
> drivers/iio/pressure/st_pressure_core.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
> index 89eb40a..09d94a6 100644
> --- a/drivers/iio/pressure/st_pressure_core.c
> +++ b/drivers/iio/pressure/st_pressure_core.c
> @@ -31,6 +31,9 @@
> #define ST_PRESS_LSB_PER_MBAR 4096UL
> #define ST_PRESS_KPASCAL_NANO_SCALE (100000000UL / \
> ST_PRESS_LSB_PER_MBAR)
> +#define ST_PRESS_LSB_PER_CELSIUS 480UL
> +#define ST_PRESS_CELSIUS_NANO_SCALE (1000000000UL / \
> + ST_PRESS_LSB_PER_CELSIUS)
> #define ST_PRESS_NUMBER_DATA_CHANNELS 1
>
> /* DEFAULT VALUE FOR SENSORS */
> @@ -53,8 +56,8 @@
> #define ST_PRESS_1_FS_ADDR 0x23
> #define ST_PRESS_1_FS_MASK 0x30
> #define ST_PRESS_1_FS_AVL_1260_VAL 0x00
> -#define ST_PRESS_1_FS_AVL_TEMP_GAIN 2083000
> #define ST_PRESS_1_FS_AVL_1260_GAIN ST_PRESS_KPASCAL_NANO_SCALE
> +#define ST_PRESS_1_FS_AVL_TEMP_GAIN ST_PRESS_CELSIUS_NANO_SCALE
> #define ST_PRESS_1_BDU_ADDR 0x20
> #define ST_PRESS_1_BDU_MASK 0x04
> #define ST_PRESS_1_DRDY_IRQ_ADDR 0x22
>
next prev parent reply other threads:[~2013-08-03 17:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 10:13 [PATCH 0/2] Fix erroneous pressure scaling for the lps331ap driver Jacek Anaszewski
2013-07-02 10:13 ` [PATCH 1/2] iio: lps331ap: Fix wrong in_pressure_scale output value Jacek Anaszewski
2013-07-16 7:51 ` Jonathan Cameron
2013-07-02 10:13 ` [PATCH 2/2] iio: lps331ap: Modify in_temp_scale calculation way Jacek Anaszewski
2013-08-03 18:01 ` Jonathan Cameron [this message]
2013-07-02 11:06 ` [PATCH 0/2] Fix erroneous pressure scaling for the lps331ap driver Jacek Anaszewski
2013-07-13 13:35 ` Jonathan Cameron
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=51FD4564.6040109@kernel.org \
--to=jic23@kernel.org \
--cc=j.anaszewski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-iio@vger.kernel.org \
--cc=s.nawrocki@samsun.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;
as well as URLs for NNTP newsgroup(s).