lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220918153747.6382c15d@jic23-huawei>
Date:   Sun, 18 Sep 2022 15:37:47 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Angel Iglesias <ang.iglesiasg@...il.com>
Cc:     linux-iio <linux-iio@...r.kernel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Nikita Yushchenko <nikita.yoush@...entembedded.com>,
        Paul Cercueil <paul@...pouillou.net>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 7/9] iio: pressure: bmp280: Add support for BMP380
 sensor family

On Sun, 18 Sep 2022 12:06:45 +0200
Angel Iglesias <ang.iglesiasg@...il.com> wrote:

> On Sat, 2022-09-17 at 14:25 +0100, Jonathan Cameron wrote:
> > On Tue, 13 Sep 2022 01:52:13 +0200
> > Angel Iglesias <ang.iglesiasg@...il.com> wrote:
> >   
> > > Adds compatibility with the new generation of this sensor, the BMP380.
> > > 
> > > Includes basic sensor initialization to do pressure and temp
> > > measurements and allows tuning oversampling settings for each channel.
> > > 
> > > The compensation algorithms are adapted from the device datasheet and
> > > the repository https://github.com/BoschSensortec/BMP3-Sensor-API.
> > > 
> > > Signed-off-by: Angel Iglesias <ang.iglesiasg@...il.com>  
> > There is one place (around the reset handing) in here where I
> > suspect we'll end up revisiting it because the matching by
> > device ID is not particularly extensible to new devices.  
> 
> Yeah, after the first time you raised that concern I've been thinking that maybe
> it would be better to add a new "init" or "preinit" callback executing first
> boot tasks for a sensor, such as this reset. Please, let me know how I can help
> with this matter. On the other hand, I'll have the BMP390 and BMP581 on my hands
> in a week or two. The BMP390 is almost the same regmap and operations as the
> BMP380, so I think it will be an easy addition. The BMP581 is a new beast that
> brings in lots of changes, but still has a good bunch of similarities.

Agreed, an .init()/.preinit() callback might make sense.

Given you are planning to look at new parts, perhaps wait until you
have a series adding one of those rather than creating churn in the
driver before that point.  Perhaps the BMP581 will require changes
in this area of the driver anyway and we don't want to end up
changing it twice!

Thanks,

Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ