All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wadim Mueller <wafgo01@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Wadim Mueller <wafgo01@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lars-Peter Clausen <lars@metafoo.de>,
	Andy Shevchenko <andy@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	Nuno Sa <nuno.sa@analog.com>,
	Rodrigo Alencar <455.rodrigo.alencar@gmail.com>,
	Maxwell Doose <m32285159@gmail.com>
Subject: Re: [PATCH v2 3/3] iio: flow: add Sensirion SLF3S liquid flow sensor driver
Date: Sat, 30 May 2026 22:42:06 +0200	[thread overview]
Message-ID: <driver-reply-1780172596743720241-wafgo01@gmail.com> (raw)
In-Reply-To: <20260528122244.2e408dd3@jic23-huawei>

On Thu, 28 May 2026 12:22:44 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

Thanks for the review (and to Rodrigo for jumping in). Inline
replies, will address all of it in v3.

> Check these.  I'd expect dev_printk.h for instance.
> Follow IWYU (approximately) for includes.

Will go through the includes and add the missing ones for what is
used directly.

> I don't think this [SLF3S_MEAS_LEN] constant being a define is
> that useful. [...] use ARRAY_SIZE() for the loop

Will move the literal to the buf declaration and use
ARRAY_SIZE(buf).

> I'd put this value [SLF3S_TEMP_SCALE_MILLIC] inline with the
> comment.

Will inline at the call site and drop the define.

> Probably more readable with 600 * MICRO / 30 * MICRO / 1920 * MILLI

Ack, will do.

> I'd be consistent and have const u8 block[at_least 3]
> [...] Use at_least, not static for kernel code

Will switch both helpers to [at_least N].

> wrap at 80 chars

Will reflow.

> If this happens I'd go with the detection over the dt provided.
> And dev_info for the mismatch [...]

Will invert: detection wins, DT is fallback for unknown sub-type,
mismatch goes to dev_info.

> More than likely we need some level of sleep here for the device to
> wake up. Is there anything in the datasheet?

Yes, tPU = 25 ms max (time to sensor ready). Will add
fsleep(25000) after the regulator enable. Also tw = 60 ms typ
(warm-up until output within spec), so will bump the existing
SLF3S_MEAS_START_DELAY_US from 12 ms to 60 ms.

> How useful is the generic compatible?

Will be dropped in v3 (agreed with Krzysztof in the binding
thread). Also moving sensirion,medium out of DT into a sysfs
attribute, since it's runtime config.

> Sashiko (probably correctly) identifies that the formatting that the
> IIO core does for an IIO_VAL_FRACTIONAL only goes to 9 decimal places.
> [...] maybe switch to using IIO_VAL_DECIMAL64_PICO
> +CC Rodrigo

Confirmed, the SLF3S-0600F scale (~1.67e-9 l/s/LSB) gets
truncated to 1 digit, the 1300F loses some precision too.

I would prefer waiting for Rodrigo's IIO_VAL_DECIMAL64_PICO over
bumping the FRACTIONAL formatter, since pico covers all variants
and avoids changing core behaviour for everyone. Plan would be
to send v3 with all other points addressed and respin to v4 once
PICO is in mainline. Ok with you, or would you rather see the
FRACTIONAL bump now?

Thanks again,
Wadim

  parent reply	other threads:[~2026-05-30 20:42 UTC|newest]

Thread overview: 47+ 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:08   ` sashiko-bot
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-24 21:10   ` sashiko-bot
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:37   ` sashiko-bot
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
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-27 19:03     ` sashiko-bot
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-27 19:11     ` sashiko-bot
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-27 19:39     ` sashiko-bot
2026-05-28 11:22     ` Jonathan Cameron
2026-05-28 13:56       ` Rodrigo Alencar
2026-05-30 20:42       ` Wadim Mueller [this message]
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=driver-reply-1780172596743720241-wafgo01@gmail.com \
    --to=wafgo01@gmail.com \
    --cc=455.rodrigo.alencar@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m32285159@gmail.com \
    --cc=nuno.sa@analog.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.