diff options
author | Angel Iglesias <ang.iglesiasg@gmail.com> | 2022-09-13 01:46:42 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-09-21 18:42:53 +0100 |
commit | 83cb40beaefaf59b224efdabecaac611b783da74 (patch) | |
tree | 3181602f8ffa78eb291bb3034e993ae75e374ae2 /drivers/iio/pressure/bmp280.h | |
parent | 2405f8cc8485d7c06fdd7b85a0df1a3febd076d6 (diff) | |
download | lwn-83cb40beaefaf59b224efdabecaac611b783da74.tar.gz lwn-83cb40beaefaf59b224efdabecaac611b783da74.zip |
iio: pressure: bmp280: Simplify bmp280 calibration data reading
On bmp280 and bme280, the temperature and pressure calibration parameters
are available on a contiguous memory region. Considering this arrangement,
simplified the calibration reading function by using only one buffer
to read in batch temperature and pressure registers.
Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Link: https://lore.kernel.org/r/96d81282c95006d857f4d836d2ff3ee0740a85a0.1663025017.git.ang.iglesiasg@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure/bmp280.h')
-rw-r--r-- | drivers/iio/pressure/bmp280.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/pressure/bmp280.h b/drivers/iio/pressure/bmp280.h index 4a501836d27a..03a539223417 100644 --- a/drivers/iio/pressure/bmp280.h +++ b/drivers/iio/pressure/bmp280.h @@ -37,6 +37,9 @@ #define BMP280_COMP_H5_MASK GENMASK(15, 4) +#define BMP280_CONTIGUOUS_CALIB_REGS (BMP280_COMP_TEMP_REG_COUNT + \ + BMP280_COMP_PRESS_REG_COUNT) + #define BMP280_FILTER_MASK GENMASK(4, 2) #define BMP280_FILTER_OFF 0 #define BMP280_FILTER_2X 1 |