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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220814175656.1d09f897@jic23-huawei>
Date:   Sun, 14 Aug 2022 17:56:56 +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>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Paul Cercueil <paul@...pouillou.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/5] iio: pressure: bmp280: Add support for BMP380
 sensor family

On Sun, 14 Aug 2022 16:37:58 +0200
Angel Iglesias <ang.iglesiasg@...il.com> wrote:

> On Sun, 2022-08-14 at 15:15 +0100, Jonathan Cameron wrote:
> > On Sun,  7 Aug 2022 13:55:52 +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>  
> > 
> > One additional comment from me inline.
> > 
> > Thanks,
> > 
> > Jonathan
> > 
> >   
> > >         }
> > > @@ -1124,6 +1471,13 @@ int bmp280_common_probe(struct device *dev,
> > >                 return -EINVAL;
> > >         }
> > >  
> > > +       /* BMP3xx requires soft-reset as part of initialization */
> > > +       if (chip_id == BMP380_CHIP_ID) {  
> > 
> > I'd prefer this to be based on a flag in chip_info so that we can
> > trivially add it to future devices by just setting that flag for the
> > chip_info added for the new device.  
> 
> How a new init or preinit callback? For now only BMP380 chip would use it, but I
> would like to get my hands on a BMP390 and the new BMP580 and extend the driver
> to support for them.

Hmm. Good point, I'd failed to noticed the register is bmp380 specific currently.
Maybe one to leave for a future refactor if you get those newer parts.

Jonathan

> 
> > > +               ret = bmp380_cmd(data, BMP380_CMD_SOFT_RESET);
> > > +               if (ret < 0)
> > > +                       return ret;
> > > +       }
> > > +
> > >         ret = data->chip_info->chip_config(data);
> > >         if (ret < 0)
> > >                 return ret;  
> >   
> 
> Kind regards,
> Angel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ