From: Wadim Mueller <wafgo01@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: jic23@kernel.org, lars@metafoo.de, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, jdelvare@suse.com,
ak@it-klinger.de, linux-iio@vger.kernel.org,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 3/4] iio: flow: add Sensirion SLF3x liquid flow sensor driver
Date: Wed, 27 May 2026 16:35:06 +0200 [thread overview]
Message-ID: <20260527143515.102794-9-wafgo01@gmail.com> (raw)
In-Reply-To: <4349f634-dd7b-468a-912c-5ceb8a283954@roeck-us.net>
On Sun, 24 May 2026 14:40:51 -0700
Guenter Roeck <linux@roeck-us.net> wrote:
> Sice you are at it, it might make sense to also support SLF3S-1300F.
Done in v2. scale_den = 30 000 000 (500 (ml/min)^-1, Table 15 of
the LQ_DS_SLF3S-1300F datasheet) and sub_type byte 0x02 (Table 13,
product number 0x07030202). Re-checked 0600F (0x07030302 -> 0x03)
and 4000B (0x07030501 -> 0x05) while I was at it, so all three
entries now match the published product numbers.
> > + { "sensirion,slf3s-0600f", "slf3s-0600f", ... }
> > drivers/iio/flow/slf3x.c
> What does the "X" refer to ? Why not "S" ?
Done in v2. Renamed everywhere - slf3x.c -> slf3s.c, SLF3X_* ->
SLF3S_*, Kconfig symbol and MAINTAINERS title too.
> > +static const u8 slf3x_cmd_start_water[] = { 0x36, 0x08 };
>
> I looked at LQ_DS_SLF3S-1300F, LQ_DS_SLF3S-0600F, and LQ_DS_SLF3S-4000B.
> They all also support Isopropyl alcohol (IPA) measurements.
>
> Would it make sense to also provide support for other liquid types
> besides water ? That could be a sysfs attribute and/or a devicetree
> property.
Picked up in v2. All three variants are factory-calibrated for
H2O and IPA; the scale factor and temperature interpretation are
identical, only the start command differs (0x3608 vs 0x3615).
v2 adds a "sensirion,medium" DT property (enum "water" / "ipa",
default water) that selects the start command at probe time, and
the binding (patch 2/3) documents it. Kept this as a probe-time
choice instead of a sysfs attribute since switching mid-run needs
a stop anyway per the datasheet.
> > +static int slf3x_verify_crc(const u8 *block)
> > +{
> > + return crc8(slf3x_crc_table, block, 2, SLF3X_CRC8_INIT) == block[2] ?
> > + 0 :
> > + -EIO;
> This returns -EIO on error ...
> > +
> > + for (i = 0; i < SLF3X_PRODUCT_ID_LEN; i += 3) {
> > + if (slf3x_verify_crc(&buf[i])) {
> ... which is then ignored here and replaced by -EIO.
>
> Why not just have it return a boolean ?
Done in v2. slf3s_crc_valid() returns bool now; the call sites
translate false into -EIO themselves.
> > + dev_err(&client->dev, "unsupported SLF3x sub-type 0x%02x\n",
> > + buf[SLF3X_SUBTYPE_BYTE]);
>
> Not my call to make, but the driver is way too noisy for my liking.
Toned down in v2:
- Unknown sub-type / unexpected family byte -> dev_dbg() and
keep going (also covers Jonathan's fallback-compatibles point).
- CRC mismatches -> dev_err_probe() in probe / dev_err() in
read_raw, one line per failure instead of per-byte spam.
Thanks,
Wadim
next prev parent reply other threads:[~2026-05-27 14:35 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 20:49 [RFC PATCH v1 0/4] iio: add Sensirion SLF3x liquid flow sensor support Wadim Mueller
2026-05-24 20:49 ` [RFC PATCH v1 1/4] iio: types: add IIO_VOLUMEFLOW channel type Wadim Mueller
2026-05-24 21:39 ` Guenter Roeck
2026-05-26 15:59 ` Jonathan Cameron
2026-05-27 14:35 ` Wadim Mueller
2026-05-27 14:35 ` Wadim Mueller
2026-05-26 16:13 ` Jonathan Cameron
2026-05-27 14:35 ` Wadim Mueller
2026-05-24 20:49 ` [RFC PATCH v1 2/4] dt-bindings: iio: flow: add Sensirion SLF3x liquid flow sensor Wadim Mueller
2026-05-26 16:19 ` Jonathan Cameron
2026-05-27 14:35 ` Wadim Mueller
2026-05-24 20:49 ` [RFC PATCH v1 3/4] iio: flow: add Sensirion SLF3x liquid flow sensor driver Wadim Mueller
2026-05-24 21:40 ` Guenter Roeck
2026-05-26 16:06 ` Jonathan Cameron
2026-05-27 14:35 ` Wadim Mueller
2026-05-27 14:35 ` Wadim Mueller [this message]
2026-05-26 16:35 ` Jonathan Cameron
2026-05-27 14:35 ` Wadim Mueller
2026-05-26 16:43 ` Jonathan Cameron
2026-05-27 14:34 ` Wadim Mueller
2026-05-24 20:49 ` [RFC PATCH v1 4/4] MAINTAINERS: add entry for Sensirion SLF3x " Wadim Mueller
2026-05-26 16:36 ` Jonathan Cameron
2026-05-27 14:35 ` Wadim Mueller
2026-05-27 14:42 ` Maxwell Doose
2026-05-27 18:36 ` Wadim Mueller
2026-05-26 16:12 ` [RFC PATCH v1 0/4] iio: add Sensirion SLF3x liquid flow sensor support Jonathan Cameron
2026-05-27 14:34 ` Wadim Mueller
2026-05-27 18:32 ` Jonathan Cameron
2026-05-27 18:42 ` [PATCH v2 0/3] iio: flow: Sensirion SLF3S liquid flow sensor Wadim Mueller
2026-05-27 18:42 ` [PATCH v2 1/3] iio: types: add IIO_VOLUMEFLOW channel type Wadim Mueller
2026-05-28 10:20 ` Jonathan Cameron
2026-05-27 18:42 ` [PATCH v2 2/3] dt-bindings: iio: flow: add Sensirion SLF3S liquid flow sensor Wadim Mueller
2026-05-28 9:07 ` Krzysztof Kozlowski
2026-05-30 20:42 ` Wadim Mueller
2026-05-27 18:42 ` [PATCH v2 3/3] iio: flow: add Sensirion SLF3S liquid flow sensor driver Wadim Mueller
2026-05-28 11:22 ` Jonathan Cameron
2026-05-28 13:56 ` Rodrigo Alencar
2026-05-30 20:42 ` Wadim Mueller
2026-05-31 8:52 ` Jonathan Cameron
2026-05-28 10:14 ` [PATCH v2 0/3] iio: flow: Sensirion SLF3S liquid flow sensor Jonathan Cameron
2026-05-30 20:42 ` Wadim Mueller
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=20260527143515.102794-9-wafgo01@gmail.com \
--to=wafgo01@gmail.com \
--cc=ak@it-klinger.de \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jdelvare@suse.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=nuno.sa@analog.com \
--cc=robh@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
all inboxes | Powered by JetHome®