Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Petar Stoykov <pd.pstoykov@gmail.com>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	 Rob Herring <robh+dt@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	 Angel Iglesias <ang.iglesiasg@gmail.com>,
	Conor Dooley <conor+dt@kernel.org>,
	 linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH v2 0/3] Add support for Sensirion SDP500
Date: Tue, 30 Apr 2024 17:27:17 +0200	[thread overview]
Message-ID: <CADFWO8EZWkXeAMcURgGGEmzVjiSxFTVAbKpsb2Qmv66EZiTc+A@mail.gmail.com> (raw)

From c4437fd0ea296c4c964b1fb924144ae24a2ce443 Mon Sep 17 00:00:00 2001
From: Petar Stoykov <pd.pstoykov@gmail.com>
Date: Mon, 29 Apr 2024 16:41:30 +0200
Subject: [PATCH 0/3] Add support for Sensirion SDP500

This patch series introduces support for Sensirion SDP500 in the IIO
subsystem. The series is split into three patches:

1. The first patch adds the device tree bindings.
2. The second patch implements the device driver.
3. The third patch updates the MAINTAINERS file.

The driver is relatively simple. It provides a way to read the measured
differential pressure directly in Pa, as the device has a fixed scale
factor of 1/60. When an applications wants to read the pressure value,
3 bytes are read from the device, 2 are data and 1 is CRC8. If the crc
check passes, the calculated pressure value is returned in Pa units.

The initialization of the device just starts the measurement process.

We have been using this device and driver in a product development for
almost a year now. There the pressure is read every 25ms and is used in a
control loop. We have not even seen crc errors. We are using the
"linux-imx" repository and not the mainline one but I see no risky kernel
functions in use so it should be fine here too.

All feedback is appreciated! Thank you for taking the time to review this.

v1->v2:
Many fixes suggested by Jonathan Cameron and Krzysztof Kozlowsk.
Mainly code style and re-using existing functions instead of custom ones.
The fixes are both in dt-bindings and iio: pressure.

Petar Stoykov (3):
  dt-bindings: iio: pressure: Add Sensirion SDP500
  iio: pressure: Add driver for Sensirion SDP500
  MAINTAINERS: Add Sensirion SDP500

 .../iio/pressure/sensirion,sdp500.yaml        |  39 +++++
 MAINTAINERS                                   |   6 +
 drivers/iio/pressure/Kconfig                  |   9 ++
 drivers/iio/pressure/Makefile                 |   1 +
 drivers/iio/pressure/sdp500.c                 | 144 ++++++++++++++++++
 5 files changed, 199 insertions(+)
 create mode 100644
Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml
 create mode 100644 drivers/iio/pressure/sdp500.c

-- 
2.30.2

             reply	other threads:[~2024-04-30 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 15:27 Petar Stoykov [this message]
2024-04-30 15:37 ` [PATCH v2 0/3] Add support for Sensirion SDP500 Andy Shevchenko
2024-04-30 16:45   ` Conor Dooley
2024-05-01 10:47     ` Petar Stoykov
2024-05-01 16:39       ` Conor Dooley
2024-05-01  9:45 ` Krzysztof Kozlowski
2024-05-01 10:58   ` Petar Stoykov

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=CADFWO8EZWkXeAMcURgGGEmzVjiSxFTVAbKpsb2Qmv66EZiTc+A@mail.gmail.com \
    --to=pd.pstoykov@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ang.iglesiasg@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).