Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 736da42

Browse files
vamoiridgregkh
authored andcommittedOct 10, 2024
iio: pressure: bmp280: Fix waiting time for BMP3xx configuration
[ Upstream commit 262a663 ] According to the datasheet, both pressure and temperature can go up to oversampling x32. With this option, the maximum measurement time is not 80ms (this is for press x32 and temp x2), but it is 130ms nominal (calculated from table 3.9.2) and since most of the maximum values are around +15%, it is configured to 150ms. Fixes: 8d32930 ("iio: pressure: bmp280: Add support for BMP380 sensor family") Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20240711211558.106327-3-vassilisamir@gmail.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ae6724f commit 736da42

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎drivers/iio/pressure/bmp280-core.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1203,10 +1203,11 @@ static int bmp380_chip_config(struct bmp280_data *data)
12031203
}
12041204
/*
12051205
* Waits for measurement before checking configuration error
1206-
* flag. Selected longest measure time indicated in
1207-
* section 3.9.1 in the datasheet.
1206+
* flag. Selected longest measurement time, calculated from
1207+
* formula in datasheet section 3.9.2 with an offset of ~+15%
1208+
* as it seen as well in table 3.9.1.
12081209
*/
1209-
msleep(80);
1210+
msleep(150);
12101211

12111212
/* Check config error flag */
12121213
ret = regmap_read(data->regmap, BMP380_REG_ERROR, &tmp);

0 commit comments

Comments
 (0)
This repository has been archived.