Skip to content
Commit b00e805a authored by Angel Iglesias's avatar Angel Iglesias Committed by Jonathan Cameron
Browse files

iio: pressure: bmp280: simplify driver initialization logic



Simplified common initialization logic of different sensor types
unifying calibration and initial configuration recovery.

Default config param values of each sensor type are stored inside
chip_info structure and used to initialize sensor data struct instance.

The helper functions for read each sensor type calibration are converted
to a callback available on the chip_info struct.

Separated bme280 specific calibration code from bmp280 function. Dropped
the additional chip_id argument in bmp280 code as is not longer required.
Now both bmp280/bme280 calibration function use same signature as bmp180.

Suggested-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarAngel Iglesias <ang.iglesiasg@gmail.com>
Link: https://lore.kernel.org/r/584c90f309e4f24bf2e4aa2b15c8577d288f978d.1663025017.git.ang.iglesiasg@gmail.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 83cb40be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment