On Wed, 8 May 2024 18:52:07 +0200 Vasileios Amoiridis <vassilisamir@xxxxxxxxx> wrote: > BMP2xx, BME280, BMP3xx, and BMP5xx use continuous buffers for their > temperature, pressure and humidity readings. This facilitates the > use of burst/bulk reads in order to acquire data faster. The > approach is different from the one used in oneshot captures. > > BMP085 & BMP1xx devices use a completely different measurement > process that is well defined and is used in their buffer_handler(). > > Suggested-by: Angel Iglesias <ang.iglesiasg@xxxxxxxxx> > Signed-off-by: Vasileios Amoiridis <vassilisamir@xxxxxxxxx> The switch to ARRAY_SIZE() for num channels will simplify this because all those values will not need to be manually updated to include the timestamp channel. Other than that, this patch and earlier ones I didn't comment on (6, 7) look good to me. Thanks, Jonathan > diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c > index 3f8144a0355b..95f56836fd86 100644 > --- a/drivers/iio/pressure/bmp280-core.c > +++ b/drivers/iio/pressure/bmp280-core.c > static const int bmp180_oversampling_temp_avail[] = { 1 }; > static const int bmp180_oversampling_press_avail[] = { 1, 2, 4, 8 }; > static const u8 bmp180_chip_ids[] = { BMP180_CHIP_ID }; > @@ -2191,7 +2464,8 @@ const struct bmp280_chip_info bmp180_chip_info = { > .regmap_config = &bmp180_regmap_config, > .start_up_time = 2000, > .channels = bmp280_channels, > - .num_channels = 2, > + .num_channels = 3, As comment on above, if this was ARRAY_SIZE(bmp280_channels) you wouldn't need to update it here. Probably best to make that change as part of the previous patch. > + .avail_scan_masks = bmp280_avail_scan_masks,