Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795915020; b=ZskZmWYePJRuzu0kNo3U55FGRzLBWNQUs2VWmBnfDgh8pJVruIUZNprK6wv5hXGCjo6T qOISRbWUQO0DxFTcLABoP7XvDDM0LYEKPRQns+3MywwHu3YdX/B+DEg1SQeFjM2qNsdwB 7wBDHfUFYPKRvH9HFAwQm5rQbzN3mfaYI+lUEiKSvAsgesdDvnm1qMh9EK1CeGmme7l9P qLjym54/QNQFej3JJB0+S0r55n38zcdn53drrgvGU4YFMnnPKtY5ZWsmNAdUsqB9wSaX0 onFpQg7R/nfEOmxhOVppXcZfXFBNT7KF8vctCm0xByYGgo6rlFFqDWaAIwu8Rm/+ZNA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795915020; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=MEeg3pD1fIOO3x2AwfT40ozeNg20w8NWKB4unXfnTwg=; b=z0MnNOsrchhtLwPQAU8ufT9dvH6VFVMiJ+Spo7u5Hl9OJLudRPUgj0+AQOmghgMltM15 ahjUd/8adawKWge4bAYDX+9RDxHXRLz2uW9Z491Slk1XEj+Vy6D7bP1mrSBXWMJBqohQ3 C3LRQCqRtVBAzeSuslFmIt6HYone9PlEMYyG22koL/B1bLI7Eyqcu80WmQTz8M2hsz3bh Txf8XrDDnOJ1RZoUga16ZYR3jRaSdMZEg533/6kVsRNuqTr46Du6u+MwjN7F4TcnGAfA5 sH1x0Tl9i/KjxhjT/eTyRB7BsakSanL3+JqxI10MG4236XjoMRitolntLtG3PdUUhfw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iOHqccV9; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6150606A31C; Sun, 29 Nov 2026 01:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iOHqccV9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88C111F000C1; Sun, 29 Nov 2026 01:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795915020; bh=MEeg3pD1fIOO3x2AwfT40ozeNg20w8NWKB4unXfnTwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=iOHqccV9VRtKQk9eIDR5y0safrUTRVjTjQZwSj1Is0E2EvDoFfhr7u5tSasaVcqOV /GG7cVYewKEmkw7yq8eAnsTRuhLyGYLHcWLfLjgUoysz/yntgHR8CslZnhHGOk9hXH FdhK8pDv7//z71WA/mSvLLHyXgDnPkn4sKojxxjmDAWvCiq7RrTcBYfoMYkU98N15z pPofgV4GrEmOxwp3OqeP33a+uNmolDbjiq+2wopQMYDSmdilT8yjfmvs921eDTnMV6 r8D4jlFB1KNTFAkvk4455vxXmlSax4i+HppUOjJWkel7tDNTdgfdpruv9SWamgxx1t 2pe1icyri/4Fw== Date: Sun, 29 Nov 2026 01:16:57 +0000 From: Jonathan Cameron To: John Erasmus Mari Geronimo Cc: , , , , , , , , , Subject: Re: [PATCH v7 2/2] iio: temperature: add support for Analog Devices MAX30210 Message-ID: <20261129011657.7f1a7f9b@jic23-hlaptop> In-Reply-To: <20261125025425.1176-3-johnerasmusmari.geronimo@analog.com> References: <20261125025425.1176-1-johnerasmusmari.geronimo@analog.com> <20261125025425.1176-3-johnerasmusmari.geronimo@analog.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 25 Nov 2026 10:54:25 +0800 John Erasmus Mari Geronimo 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 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; > +}