]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: pressure: bmp280: Remove config error check for IIR filter updates
authorVasileios Amoiridis <vassilisamir@gmail.com>
Mon, 2 Sep 2024 18:42:18 +0000 (20:42 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:21:02 +0000 (09:21 +0100)
commit7e1df2cab30399e60f3a71ba4f653b77f3f30c2a
treea2aa3eaacf96e322cd0279c47b8da5e0f20f6dcc
parent1a8a87879e79bedc2074eb722784b1d162564e62
iio: pressure: bmp280: Remove config error check for IIR filter updates

When there is a change in the configuration of the BMP3xx device, several
steps take place. These steps include:

1) Update the OSR settings and check if there was an update
2) Update the ODR settings and check if there was an update
3) Update the IIR settings and check if there was an update
4) Check if there was an update with the following procedure:
a) Set sensor to SLEEP mode and after to NORMAL mode to trigger
   a new measurement.
b) Wait the maximum amount possible depending on the OSR settings
c) Check the configuration error register if there was an error
   during the configuration of the sensor.

This check is necessary, because there could be a case where the OSR is
too high for the requested ODR so either the ODR needs to be slower or the
OSR needs to be less. This is something that is checked internally by the
sensor when it runs in NORMAL mode.

In the BMP58x devices the previous steps are done internally by the sensor.

The IIR filter settings do not depend on the OSR or ODR settings, and there
is no need to run a check in case they change.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240902184222.24874-4-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/bmp280-core.c