From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Tomasz Duszynski <tduszyns@gmail.com>,
Stefan Tatschner <stefan.tatschner@gmail.com>,
Andreas Klinger <ak@it-klinger.de>
Subject: Re: [PATCH] iio: pressure: bmp280: BMP280 calibration to entropy
Date: Sat, 16 Mar 2019 16:07:54 +0000 [thread overview]
Message-ID: <20190316160754.014dbbe7@archlinux> (raw)
In-Reply-To: <20190312084018.12697-1-linus.walleij@linaro.org>
On Tue, 12 Mar 2019 09:40:18 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:
> The BMP280/BME280 calibration data should also go into the
> entropy pool, like we do for BMP180.
>
> This just adds the temperature and pressure calibration, the
> humidity calibration seems like too much annoying calls to
> add.
>
> Cc: Tomasz Duszynski <tduszyns@gmail.com>
> Cc: Stefan Tatschner <stefan.tatschner@gmail.com>
> Cc: Andreas Klinger <ak@it-klinger.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
I'm going to assume you checked these are actually factory set
to values that vary.
Anyhow, applied to the togreg branch of iio.git and pushed out
as testing for the autobuilders to play with them.
Thanks,
Jonathan
> ---
> drivers/iio/pressure/bmp280-core.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c
> index fe87d27779d9..3329d740c86c 100644
> --- a/drivers/iio/pressure/bmp280-core.c
> +++ b/drivers/iio/pressure/bmp280-core.c
> @@ -164,6 +164,9 @@ static int bmp280_read_calib(struct bmp280_data *data,
> return ret;
> }
>
> + /* Toss the temperature calibration data into the entropy pool */
> + add_device_randomness(t_buf, sizeof(t_buf));
> +
> calib->T1 = le16_to_cpu(t_buf[T1]);
> calib->T2 = le16_to_cpu(t_buf[T2]);
> calib->T3 = le16_to_cpu(t_buf[T3]);
> @@ -177,6 +180,9 @@ static int bmp280_read_calib(struct bmp280_data *data,
> return ret;
> }
>
> + /* Toss the pressure calibration data into the entropy pool */
> + add_device_randomness(p_buf, sizeof(p_buf));
> +
> calib->P1 = le16_to_cpu(p_buf[P1]);
> calib->P2 = le16_to_cpu(p_buf[P2]);
> calib->P3 = le16_to_cpu(p_buf[P3]);
prev parent reply other threads:[~2019-03-16 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 8:40 [PATCH] iio: pressure: bmp280: BMP280 calibration to entropy Linus Walleij
2019-03-16 16:07 ` Jonathan Cameron [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=20190316160754.014dbbe7@archlinux \
--to=jic23@kernel.org \
--cc=ak@it-klinger.de \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=stefan.tatschner@gmail.com \
--cc=tduszyns@gmail.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.