Re: [PATCH v5 3/5] iio: pressure: bmp280: Add support for BMP380 sensor family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Aug 2022 12:47:20 +0200
Angel Iglesias <ang.iglesiasg@xxxxxxxxx> wrote:

> On lun, 2022-08-08 at 11:08 +0200, Andy Shevchenko wrote:
> > On Sun, Aug 7, 2022 at 1:56 PM Angel Iglesias <ang.iglesiasg@xxxxxxxxx> 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  
> > 
> > Missed period.
> > 
> > ...
> >   
> > >   *
> > > https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMP180-DS000-121.pdf
> > >   *
> > > https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMP280-DS001-12.pdf
> > >   *
> > > https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME280_DS001-11.pdf  
> > 
> > Seems like the above links are unresponsive now? Perhaps you may fix
> > them as well in a separate patch?  
> 
> Sure. Should I include this patch in this next version of this series, or should
> I send the patch as a standalone change?

Either way is fine. Thanks for tidying this up!

> 
> > > + *
> > > https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp388-ds001.pdf  
> > 
> > ...
> >   
> > > +/* See datasheet Section 3.11.1. */  
> > 
> > Again, a bit of consistency in (one-line) comments, please.
> >   
> > > +struct bmp380_calib {
> > > +       u16 T1;
> > > +       u16 T2;
> > > +       s8  T3;
> > > +       s16 P1;
> > > +       s16 P2;
> > > +       s8  P3;
> > > +       s8  P4;
> > > +       u16 P5;
> > > +       u16 P6;
> > > +       s8  P7;
> > > +       s8  P8;
> > > +       s16 P9;
> > > +       s8  P10;
> > > +       s8  P11;
> > > +};  
> > 
> > __packed ?
Nope - the unpacking is done on filling this array.

Could reorder to reduce size a little but given the naming vs datasheet
that would look very odd. I'd leave this as it is.


> >   
> > > +       /* Compensated pressure is in cPa (centipascals) */
> > > +       *val2 = 100000;  
> > 
> > Anything to use from units.h?

Not sure we want to add centi to killo conversion!
That combination is rather rare.

Jonathan




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux