devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] changes to mprls0025pa
@ 2023-12-24 14:34 Petre Rodan
  2023-12-24 14:34 ` [PATCH v2 01/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml fix Petre Rodan
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Petre Rodan @ 2023-12-24 14:34 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-kernel
  Cc: Petre Rodan, Andreas Klinger, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andy Shevchenko

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
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
---
Petre Rodan (10):
  dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml fix
  dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add
    pressure-triplet
  dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add spi bus
  iio: pressure: mprls0025pa.c fix off-by-one enum
  iio: pressure: mprls0025pa.c fix error flag check
  iio: pressure: mprls0025pa.c remove dangerous defaults
  iio: pressure: mprls0025pa.c whitespace cleanup
  iio: pressure: mprls0025pa.c refactor
  iio: pressure: mprls0025pa.c add triplet property
  iio: pressure: mprls0025pa.c add SPI driver

 .../iio/pressure/honeywell,mprls0025pa.yaml   |  97 ++++--
 MAINTAINERS                                   |   3 +-
 drivers/iio/pressure/Kconfig                  |  14 +-
 drivers/iio/pressure/Makefile                 |   2 +
 drivers/iio/pressure/mprls0025pa.c            | 308 +++++++++---------
 drivers/iio/pressure/mprls0025pa.h            | 100 ++++++
 drivers/iio/pressure/mprls0025pa_i2c.c        |  98 ++++++
 drivers/iio/pressure/mprls0025pa_spi.c        |  91 ++++++
 8 files changed, 539 insertions(+), 174 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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-12-30 11:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-24 14:34 [PATCH v2 00/10] changes to mprls0025pa Petre Rodan
2023-12-24 14:34 ` [PATCH v2 01/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml fix Petre Rodan
2023-12-25 12:55   ` Krzysztof Kozlowski
2023-12-26 16:28   ` Jonathan Cameron
2023-12-26 16:31     ` Jonathan Cameron
2023-12-27  7:11     ` Petre Rodan
2023-12-30 11:28       ` Jonathan Cameron
2023-12-24 14:34 ` [PATCH v2 02/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add pressure-triplet Petre Rodan
2023-12-25 12:57   ` Krzysztof Kozlowski
2023-12-25 13:23     ` Petre Rodan
2023-12-25 13:34       ` Krzysztof Kozlowski
2023-12-25 13:37         ` Krzysztof Kozlowski
2023-12-25 13:58         ` Petre Rodan
2023-12-24 14:34 ` [PATCH v2 03/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add spi bus Petre Rodan
2023-12-25 12:59   ` Krzysztof Kozlowski
2023-12-25 15:13     ` Petre Rodan
2023-12-25 18:56       ` Krzysztof Kozlowski
2023-12-25 20:29         ` Petre Rodan
2023-12-26  9:38           ` Krzysztof Kozlowski

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).