linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Angel Iglesias <ang.iglesiasg@gmail.com>
To: linux-iio@vger.kernel.org
Cc: Angel Iglesias <ang.iglesiasg@gmail.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Paul Cercueil <paul@crapouillou.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/5] Add support for pressure sensor Bosch BMP380
Date: Sat, 23 Jul 2022 19:36:32 +0200	[thread overview]
Message-ID: <cover.1658597501.git.ang.iglesiasg@gmail.com> (raw)

This patchset adds BMP380 variant to the already existing drivers for
the Bosch BMP180/280 pressure sensors.

Patch 1 adds references and sensor id to the devicetree bindings docs.
Patch 2 is a minor refactor simplifying driver initialization logic
to facilitate the integration of the new sensor variant extending the
information stored in the "chip_info" struct.
Patch 3 fixes DMA unsafe regmap_bulk_* calls reported by Jonathan Cameron
<jic23@kernel.org>.
Patch 4 adds the basic logic to initialize and read measurements from
the sensor.
Patch 5 adds advanced configurable features such as sampling frequency
and IIR filter through the IIO sysfs ABI.

Changes in v4:
 - Patch 4 and 2: Merged v3 patch 2 (Kconfig refs update) into this patch.
 - Patch 3: Added patch fixing unsafe DMA regmap_bulk_* calls reported by
    Jonathan Cameron <jic23@kernel.org>.
 - Patch 4: Fixed DMA unsafe buffers used on regmap_bulk_* calls reported
    by Jonathan Cameron <jic23@kernel.org>.

Changes in v3:
 - Patch 2: Fixed incorrect abbreviation.
 - Patch 3: use dev_err_probe helper to handle error initializing sensor.
 - Patch 4: Fixed kernel test robot warning provoked by missing include.
 - Patch 4: Fixed bug reported by Dan Carpenter <dan.carpenter@oracle.com>.
 - Patch 5: Fixed formatting and typos on multiple comments.
 - Patch 5: Fixed missing boolean initialization reported by
    Andy Shevchenko <andy.shevchenko@gmail.com>.
 - Patch 5: Replaced duplicated comments with a single comment containing
    a brief explantation in a shared location.
 - Patch 5: Dropped incorrect use of unlikely macro.

Changes in v2:
 - Added patch 2 updating Kconfig with references to new sensor.
 - Patch 3 adds changes proposed by Jonathan Cameron <jic23@kernel.org>
    to declutter and unify configuration logic for the different sensors
    extending "chip_info" struct with default configuration parameters.
 - Patch 4: store temperature and pressure adc values on 3 byte array
    instead of using the type __le32. Uses function get_unaligned_le24
    to convert the little-endian encoded 3 byte value to an integer.
 - Patch 4: drops custom macro le16_from_bytes and use get_unaligned_le16.
 - Patch 4: generate masks using GENMASK macro.
 - Patch 4: use FIELD_PREP to generate bitfields for registries.
 - Patch 4: dropped stray formatting change.
 - Patch 5: adds sanity checks in bmp280_read_raw for channel properties
   only available in the BMP380.
 - Patch 5: on bmp280_write_* checks if a problem ocurred committing new
    configuration and tries to restore previous working configuration
    to keep the sensor in a previous working state.
 - Patch 5: refactored bmp380_chip_config to only check for configuration
    errors when a configuration change is detected.
 - Patch 5: improved invalid configuration detection on BMP380 restarting
    measurement loop to force a new measurement after the configuration is
    updated.

Angel Iglesias (5):
  dt-bindings: iio: pressure: bmp085: Add BMP380 compatible string
  iio: pressure: bmp280: simplify driver initialization logic
  iio: pressure: bmp280: Fix alignment for DMA safety
  iio: pressure: bmp280: Add support for BMP380 sensor family
  iio: pressure: bmp280: Add more tunable config parameters for BMP380

 .../bindings/iio/pressure/bmp085.yaml         |   4 +-
 drivers/iio/pressure/Kconfig                  |   6 +-
 drivers/iio/pressure/bmp280-core.c            | 884 ++++++++++++++++--
 drivers/iio/pressure/bmp280-i2c.c             |   5 +
 drivers/iio/pressure/bmp280-regmap.c          |  55 ++
 drivers/iio/pressure/bmp280-spi.c             |   5 +
 drivers/iio/pressure/bmp280.h                 |  83 ++
 7 files changed, 937 insertions(+), 105 deletions(-)


base-commit: 180c6cb6b9b79c55b79e8414f4c0208f2463af7d
-- 
2.37.1


             reply	other threads:[~2022-07-23 17:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 17:36 Angel Iglesias [this message]
2022-07-23 17:38 ` [PATCH v4 1/5] dt-bindings: iio: pressure: bmp085: Add BMP380 compatible string Angel Iglesias
2022-07-23 17:38 ` [PATCH v4 2/5] iio: pressure: bmp280: simplify driver initialization logic Angel Iglesias
2022-07-25 21:05   ` Andy Shevchenko
2022-07-23 17:39 ` [PATCH v4 3/5] iio: pressure: bmp280: Fix alignment for DMA safety Angel Iglesias
2022-07-25 21:08   ` Andy Shevchenko
2022-07-31 16:07     ` Jonathan Cameron
2022-07-31 16:13   ` Jonathan Cameron
2022-08-01  8:08     ` Angel Iglesias
2022-07-23 17:39 ` [PATCH v4 4/5] iio: pressure: bmp280: Add support for BMP380 sensor family Angel Iglesias
2022-07-23 22:50   ` kernel test robot
2022-07-24  0:02   ` kernel test robot
2022-07-24  0:22   ` kernel test robot
2022-07-25 21:15   ` Andy Shevchenko
2022-08-01  7:49     ` Angel Iglesias
2022-07-31 16:16   ` Jonathan Cameron
2022-08-01  7:57     ` Angel Iglesias
2022-07-23 17:40 ` [PATCH v4 5/5] iio: pressure: bmp280: Add more tunable config parameters for BMP380 Angel Iglesias
2022-07-25 21:19   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1658597501.git.ang.iglesiasg@gmail.com \
    --to=ang.iglesiasg@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@crapouillou.net \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).