Skip to content

Add support for pressure sensor Bosch BMP580

Angel Iglesias linux-devicetree linux-iio lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 1 replyIn review
  2. v37 patches 5 repliesSuperseded
  3. v25 patches 22 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches3 repliesSuperseded

Changes in v4 from the cover letter

* Dropped redundant and excessive verbose comments.
* Change BMP580 temp IIO return type to IIO_VAL_FRACTIONAL_LOG2
* Dropped loop waiting for NVM operation completion and use regmap_read_poll_timeout instead.
* Fix various sizeof calls on NVMEM handling codepath.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7iio: pressure: bmp280: Use chip_info pointers for each chip as driver datadrivers/iio/pressure/bmp280-core.c drivers/iio/pressure/bmp280-i2c.c drivers/iio/pressure/bmp280-spi.c +1 more+215 -2270 replies
2/7iio: pressure: bmp280: Add preinit callbackdrivers/iio/pressure/bmp280-core.c drivers/iio/pressure/bmp280.h+13 -50 replies
3/7iio: pressure: bmp280: Make read calibration callback optionaldrivers/iio/pressure/bmp280-core.c+6 -40 replies
4/7iio: pressure: Kconfig: Delete misleading I2C reference on bmp280 titledrivers/iio/pressure/Kconfig+1 -10 replies
5/7iio: pressure: bmp280: Add support for new sensor BMP580drivers/iio/pressure/Kconfig drivers/iio/pressure/bmp280-core.c drivers/iio/pressure/bmp280-i2c.c +3 more+509 -120 replies
6/7dt-bindings: iio: pressure: bmp085: Add BMP580 compatible stringDocumentation/devicetree/bindings/iio/pressure/bmp085.yaml+2 -00 replies
7/7iio: pressure: bmp280: Add nvmem operations for BMP580drivers/iio/pressure/bmp280-core.c drivers/iio/pressure/bmp280.h+212 -11 reply

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoKrzysztof Kozlowski
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7A-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/7] Add support for pressure sensor Bosch BMP580

This patchset adds support for the new pressure sensors BMP580 extending the bmp280 driver.

Patch 1 introduces a minor refactor of the driver structure to change how the device matching and driver initialization is performed. In place of the chips ids, the driver_data now contains a pointer to its chip_info. To perform this change, a series of declarations previously on the core file were migrated to the shared header file, to allow access to specific fields on the chip_info on the I2C and SPI drivers. This change is required because BMP380 and BMP580 have the same chip_id and values would collide using the chip_id as the driver_data value.
Patch 2 introduces new preinit callback and unifies init logic across all supported variants.
Patch 3 made calibration callback function optional.
Patch 4 deletes misleading i2c reference on bmp280 Kconfig entry. Patch 5 extends the bmp280 driver with the new logic to read measurements and configure the operation parameters for the BMP580 sensors. Patch 6 updates the devicetree binding docs with the new sensor id. Patch 7 adds the NVMEM operations to read and program the NVM user range contained in the non-volatile memory of the BMP580 sensors.

Changes in v4:
* Dropped redundant and excessive verbose comments.
* Change BMP580 temp IIO return type to IIO_VAL_FRACTIONAL_LOG2
* Dropped loop waiting for NVM operation completion and use regmap_read_poll_timeout instead.
* Fix various sizeof calls on NVMEM handling codepath.

Changes in v3:
* Refactor driver structure to use chip_info structs as driver_data and updated i2c and spi implementations device match codepaths.
* Deleted Kconfig driver title misleading i2c reference.
* Made calibration reading optional as a prerequisite patch in preparation for the bmp580 built in compensation.
* Break command helper function in soft-reset helper function and NVM operation helper.
* Fixed minor styling issues thorough patches.

Changes in v2:
* For patch 3, fixed missing retcodes reported by the kernel test robot.
* For patch 5, fixed logic paths that left the sensor mutex locked reported by the kernel test robot.

Angel Iglesias (7):
iio: pressure: bmp280: Use chip_info pointers for each chip as driver
data
iio: pressure: bmp280: Add preinit callback
iio: pressure: bmp280: Make read calibration callback optional
iio: pressure: Kconfig: Delete misleading I2C reference on bmp280
title
iio: pressure: bmp280: Add support for new sensor BMP580
dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string
iio: pressure: bmp280: Add nvmem operations for BMP580

 .../bindings/iio/pressure/bmp085.yaml         |   2 +
 drivers/iio/pressure/Kconfig                  |   6 +-
 drivers/iio/pressure/bmp280-core.c            | 765 +++++++++++++-----
 drivers/iio/pressure/bmp280-i2c.c             |  45 +-
 drivers/iio/pressure/bmp280-regmap.c          |  60 ++
 drivers/iio/pressure/bmp280-spi.c             |  47 +-
 drivers/iio/pressure/bmp280.h                 | 273 ++++++-
 7 files changed, 953 insertions(+), 245 deletions(-)

base-commit: 91ba2700aa75859957613aedf307a04a83010cee

Signature · 1 line
2.39.2