From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from saturn.retrosnub.co.uk ([178.18.118.26]:53830 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbcF0S7R (ORCPT ); Mon, 27 Jun 2016 14:59:17 -0400 Subject: Re: [PATCH 9/9 v2] iio: pressure: bmp280: read calibration data once To: Linus Walleij References: <1466628819-29784-1-git-send-email-linus.walleij@linaro.org> <1466628819-29784-10-git-send-email-linus.walleij@linaro.org> Cc: "linux-iio@vger.kernel.org" , Akinobu Mita , "H. Nikolaus Schaller" , Matt Ranostay , Christoph Mair , Vlad Dogaru , Hartmut Knaack , Marek Belisko , Eric Andersson , Neil Brown From: Jonathan Cameron Message-ID: <2efdabca-f229-89d4-cbc1-4b4e05856296@kernel.org> Date: Mon, 27 Jun 2016 19:59:15 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On 27/06/16 13:11, Linus Walleij wrote: > On Sun, Jun 26, 2016 at 12:21 PM, Jonathan Cameron wrote: >> On 22/06/16 21:53, Linus Walleij wrote: >>> The calibration data is described as coming from an E2PROM and that >>> means it does not change. Just read it once at probe time and store >>> it in the device state container. Also toss the calibration data >>> into the entropy pool since it is device unique. >>> >>> Signed-off-by: Linus Walleij >> >> One nitpick inline, but it's minor enough I'm just being grumpy >> about it so don't bother fixing it unless you want to. >> >> On the adding entropy bit, any idea who to sanity check that with? >> It's not something we've done before, so I just want a bit of >> reassurance ideally;) > > I've done it in a few places whenever I ran into device-unique numbers, > actually sensors often have device-unique calibration and are thus well > suited to toss into the entropy pool. > > The data from devices isn't really trusted to increase entropy: it may, > but it's not relied on by the algorithm, just mixed in, see: > http://lwn.net/Articles/507115/ Fair enough then. J > >>> ret = regmap_bulk_read(data->regmap, BMP180_REG_CALIB_START, buf, >>> sizeof(buf)); >>> - >> Good but unrelated change. Should have been in a different patch... > > Dropped unrelated whitespace fix. > > Yours, > Linus Walleij >