mbox series

[v2,0/3] Add support for Sensirion SDP500

Message ID CADFWO8EZWkXeAMcURgGGEmzVjiSxFTVAbKpsb2Qmv66EZiTc+A@mail.gmail.com (mailing list archive)
Headers show
Series Add support for Sensirion SDP500 | expand

Message

Petar Stoykov April 30, 2024, 3:27 p.m. UTC
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

Comments

Andy Shevchenko April 30, 2024, 3:37 p.m. UTC | #1
On Tue, Apr 30, 2024 at 05:27:17PM +0200, Petar Stoykov wrote:
> 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

It's not. I mean from the email chaining perspective. Have you forgotten
to add --thread to git format-patch?

Also, what is that in above?

> 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.
Conor Dooley April 30, 2024, 4:45 p.m. UTC | #2
On Tue, Apr 30, 2024 at 06:37:14PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 30, 2024 at 05:27:17PM +0200, Petar Stoykov wrote:
> > 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
> 
> It's not. I mean from the email chaining perspective. Have you forgotten
> to add --thread to git format-patch?
> 
> Also, what is that in above?

Looks more like patches pasted into gmail or w/e, rather than sent with
git send-email.
Krzysztof Kozlowski May 1, 2024, 9:45 a.m. UTC | #3
On 30/04/2024 17:27, Petar Stoykov wrote:
> 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.

No, be specific. What EXACTLY changed. This is way too generic.
Considering entire indentation is broken, I could assume you actually
did not implement feedback.

Best regards,
Krzysztof
Petar Stoykov May 1, 2024, 10:47 a.m. UTC | #4
On Tue, Apr 30, 2024 at 6:46 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Tue, Apr 30, 2024 at 06:37:14PM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 30, 2024 at 05:27:17PM +0200, Petar Stoykov wrote:
> > > 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
> >
> > It's not. I mean from the email chaining perspective. Have you forgotten
> > to add --thread to git format-patch?
> >
> > Also, what is that in above?
>
> Looks more like patches pasted into gmail or w/e, rather than sent with
> git send-email.

For stupid reasons I can't use git send-email. I thought I will manage with
using gmail alone. The thing at the start is a mess-up of copy paste indeed.
Petar Stoykov May 1, 2024, 10:58 a.m. UTC | #5
On Wed, May 1, 2024 at 11:45 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 30/04/2024 17:27, Petar Stoykov wrote:
> > 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.
>
> No, be specific. What EXACTLY changed. This is way too generic.
> Considering entire indentation is broken, I could assume you actually
> did not implement feedback.
>
> Best regards,
> Krzysztof
>

Hi Krzysztof, I'll include all changes in v3 then (or as a response here?).
I just thought it was too much to list all changes.
And about the indentation, can you elaborate please?
Conor Dooley May 1, 2024, 4:39 p.m. UTC | #6
On Wed, May 01, 2024 at 12:47:32PM +0200, Petar Stoykov wrote:
> On Tue, Apr 30, 2024 at 6:46 PM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Tue, Apr 30, 2024 at 06:37:14PM +0300, Andy Shevchenko wrote:
> > > On Tue, Apr 30, 2024 at 05:27:17PM +0200, Petar Stoykov wrote:
> > > > 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
> > >
> > > It's not. I mean from the email chaining perspective. Have you forgotten
> > > to add --thread to git format-patch?
> > >
> > > Also, what is that in above?
> >
> > Looks more like patches pasted into gmail or w/e, rather than sent with
> > git send-email.
> 
> For stupid reasons I can't use git send-email. I thought I will manage with
> using gmail alone. The thing at the start is a mess-up of copy paste indeed.

As Konstantin pointed out, the b4 web submission endpoint is ideal for
this kind of scenario.