Linux IIO development
 help / color / mirror / Atom feed
From: Petre Rodan <petre.rodan@subdimension.ro>
To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Petre Rodan <petre.rodan@subdimension.ro>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andreas Klinger <ak@it-klinger.de>
Subject: [PATCH v3 00/10] changes to mprls0025pa
Date: Fri, 29 Dec 2023 11:24:28 +0200	[thread overview]
Message-ID: <20231229092445.30180-1-petre.rodan@subdimension.ro> (raw)

A number of fixes to the mprls0025pa driver:
 - an off-by-one initially caused by a typo in the bindings file
 - two error fields are never checked during sensor interaction
 - unsafe initialization if the driver is instantiated via sysfs
   and the bindings are missing

Quality of life changes:
 - a refactor that adds a pressure-triplet property which initializes
pmin-pascal and pmax-pascal just like in the hsc030pa driver.
The user only needs to extract a short string from the chip name
instead of looking up the chip in the datasheet, understand the
nomenclature, extract the measurement range and then convert all units
to pascals.

New feature:
 - SPI compatibility for Honeywell MPR sensors that require it.

Both binding and driver are backwards compatible.
Tested in I2C and SPI modes with two different sensors.
The refactor requires property function present in the togreg branch.

Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf
Co-developed-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>

Petre Rodan (10):
  dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml improvements
  dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add
    pressure-triplet
  dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add spi bus
  iio: pressure: mprls0025pa fix off-by-one enum
  iio: pressure: mprls0025pa improve driver error resilience
  iio: pressure: mprls0025pa remove defaults
  iio: pressure: mprls0025pa whitespace cleanup
  iio: pressure: mprls0025pa refactor
  iio: pressure: mprls0025pa add triplet property
  iio: pressure: mprls0025pa add SPI driver

 .../iio/pressure/honeywell,mprls0025pa.yaml   |  98 ++++--
 MAINTAINERS                                   |   3 +-
 drivers/iio/pressure/Kconfig                  |  14 +-
 drivers/iio/pressure/Makefile                 |   2 +
 drivers/iio/pressure/mprls0025pa.c            | 313 +++++++++---------
 drivers/iio/pressure/mprls0025pa.h            | 102 ++++++
 drivers/iio/pressure/mprls0025pa_i2c.c        |  98 ++++++
 drivers/iio/pressure/mprls0025pa_spi.c        |  89 +++++
 8 files changed, 542 insertions(+), 177 deletions(-)
 create mode 100644 drivers/iio/pressure/mprls0025pa.h
 create mode 100644 drivers/iio/pressure/mprls0025pa_i2c.c
 create mode 100644 drivers/iio/pressure/mprls0025pa_spi.c

--
2.41.0


             reply	other threads:[~2023-12-29  9:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29  9:24 Petre Rodan [this message]
2023-12-29  9:24 ` [PATCH v3 01/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml improvements Petre Rodan
2023-12-29  9:24 ` [PATCH v3 02/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add pressure-triplet Petre Rodan
2024-01-04  8:26   ` Krzysztof Kozlowski
2023-12-29  9:24 ` [PATCH v3 03/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add spi bus Petre Rodan
2024-01-04  8:26   ` Krzysztof Kozlowski
2023-12-29  9:24 ` [PATCH v3 04/10] iio: pressure: mprls0025pa fix off-by-one enum Petre Rodan
2023-12-29  9:24 ` [PATCH v3 05/10] iio: pressure: mprls0025pa improve driver error resilience Petre Rodan
2023-12-29  9:24 ` [PATCH v3 06/10] iio: pressure: mprls0025pa remove defaults Petre Rodan
2023-12-29  9:24 ` [PATCH v3 07/10] iio: pressure: mprls0025pa whitespace cleanup Petre Rodan
2024-01-06 15:24   ` Andy Shevchenko
2023-12-29  9:24 ` [PATCH v3 08/10] iio: pressure: mprls0025pa refactor Petre Rodan
2023-12-29  9:24 ` [PATCH v3 09/10] iio: pressure: mprls0025pa add triplet property Petre Rodan
2023-12-29  9:24 ` [PATCH v3 10/10] iio: pressure: mprls0025pa add SPI driver Petre Rodan
2024-01-06 15:30   ` Andy Shevchenko
2024-01-06 16:02     ` Petre Rodan
2024-01-06 16:07       ` Andy Shevchenko
2024-01-07 16:32         ` Jonathan Cameron

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=20231229092445.30180-1-petre.rodan@subdimension.ro \
    --to=petre.rodan@subdimension.ro \
    --cc=ak@it-klinger.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.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