From: Jonathan Cameron <jic23@kernel.org>
To: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<krzk+dt@kernel.org>, <dlechner@baylibre.com>,
<nuno.sa@analog.com>, <Michael.Hennerich@analog.com>,
<andy@kernel.org>, <robh@kernel.org>, <conor+dt@kernel.org>,
<joshua.crofts1@gmail.com>
Subject: Re: [PATCH v7 2/2] iio: temperature: add support for Analog Devices MAX30210
Date: Sun, 29 Nov 2026 01:16:57 +0000 [thread overview]
Message-ID: <20261129011657.7f1a7f9b@jic23-hlaptop> (raw)
In-Reply-To: <20261125025425.1176-3-johnerasmusmari.geronimo@analog.com>
On Wed, 25 Nov 2026 10:54:25 +0800
John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com> wrote:
> Add support for the Analog Devices MAX30210 I2C temperature
> sensor.
>
> The driver uses regmap for register access and integrates with
> the IIO framework. It supports:
>
> - Direct mode temperature conversion
> - Configurable sampling frequency
> - Threshold events
> - FIFO operation with IIO kfifo buffer support
> - Optional interrupt-driven data ready signaling
>
> The device provides 16-bit signed temperature data and a
> 64-sample FIFO.
>
> Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/max30210.pdf
> Signed-off-by: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com>
Sashiko has a bit of feedback. If it is wrong then just reply here
to say why. I didn't try to figure out if it is or not.
https://sashiko.dev/#/patchset/20261125025425.1176-1-johnerasmusmari.geronimo%40analog.com
The only thing I noted isn't a reason for a new spin, so just
look at that if the sashiko comments mean we need a v8 (or some
other feedback comes in).
> diff --git a/drivers/iio/temperature/max30210.c b/drivers/iio/temperature/max30210.c
> new file mode 100644
> index 0000000000000..5f704bf9a8480
> --- /dev/null
> +++ b/drivers/iio/temperature/max30210.c
> +static int max30210_buffer_predisable(struct iio_dev *indio_dev)
> +{
> + struct max30210_state *st = iio_priv(indio_dev);
> + int ret, err;
> +
> + /* Stop the FIFO interrupt and wait for a running handler before the buffer goes away. */
> + ret = regmap_clear_bits(st->regmap, MAX30210_INT_EN_REG,
> + MAX30210_STATUS_A_FULL_MASK);
> + synchronize_irq(st->irq);
> +
> + scoped_guard(mutex, &st->lock)
> + err = max30210_autoconv_put(st);
If you are rolling again for any reason, perhaps just use a guard() here.
> +
> + return ret ?: err;
> +}
next prev parent reply other threads:[~2026-11-29 1:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 2:54 [PATCH v7 0/2] Add support for Analog Devices MAX30210 John Erasmus Mari Geronimo
2026-11-25 2:54 ` [PATCH v7 1/2] dt-bindings: iio: temperature: add ADI MAX30210 John Erasmus Mari Geronimo
2026-11-25 2:54 ` [PATCH v7 2/2] iio: temperature: add support for Analog Devices MAX30210 John Erasmus Mari Geronimo
2026-11-25 3:08 ` sashiko-bot
2026-11-29 1:16 ` Jonathan Cameron [this message]
2026-11-29 1:06 ` [PATCH v7 0/2] Add " Jonathan Cameron
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=20261129011657.7f1a7f9b@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=johnerasmusmari.geronimo@analog.com \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--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