[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240512133409.6fb350c4@jic23-huawei>
Date: Sun, 12 May 2024 13:34:09 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Vasileios Amoiridis <vassilisamir@...il.com>
Cc: lars@...afoo.de, andriy.shevchenko@...ux.intel.com,
ang.iglesiasg@...il.com, mazziesaccount@...il.com, ak@...klinger.de,
petre.rodan@...dimension.ro, phil@...pberrypi.com, 579lpy@...il.com,
linus.walleij@...aro.org, semen.protsenko@...aro.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 9/9] iio: pressure: bmp280: Add triggered buffer
support
On Wed, 8 May 2024 18:52:07 +0200
Vasileios Amoiridis <vassilisamir@...il.com> 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@...il.com>
> Signed-off-by: Vasileios Amoiridis <vassilisamir@...il.com>
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,
Powered by blists - more mailing lists