From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 864FD3EBF2D for ; Tue, 17 Mar 2026 15:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773762034; cv=none; b=JyZevtEDCKffQxK9Kw+w45oHx14MEVp7ICIZa10LjtYr6dmMsLT2e1v3LboOhIkUpEeEIa1wdk6D0uAu+hf+OM76djEIGNVASKQ7iW58CdVXH5PoqW7XGctVoJ6fV5XyGF6RPI1Wp/tIWPTetgstfE4kJ3rvK8A+RFecE7HPZXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773762034; c=relaxed/simple; bh=aGEpsIoRuiCGeJjOG0LxP8ahqPX6ZbREOGXtpn7izTo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Auuy4mAgekd5udlIpY0c5wya2+dqBJLz8XIKObUWqHv3EmvAktTla5gYMg8/2oSO+65FtLSmf82kpnDdO/BXr9x494CHZg7rdRkP9qGvKUAVW3yHdoOfVT1ggOWTWanqiBETDXWY3HAvZpwwQ4kWpqdbb38G71awwxYkL4gIIgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v7DpeUIn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="v7DpeUIn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82FA5C4CEF7; Tue, 17 Mar 2026 15:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773762033; bh=aGEpsIoRuiCGeJjOG0LxP8ahqPX6ZbREOGXtpn7izTo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v7DpeUIn/64CgfZ4jBHV/SV395Emg2QDunDA1uv2r4c0GY9rVHakd/GdKIdHpcg4M r2qeBkddmszakic+EwvKG6yJq++OPJCpax1rAAROkcjOP618/xvfZ5OYykzgK6MKfd vsgG8u46q+0wI0cDMej8sS9qS5I7rlzmCbU7BQqM= Date: Tue, 17 Mar 2026 16:40:22 +0100 From: Greg KH To: inv.git-commit@tdk.com Cc: stable@vger.kernel.org, Jean-Baptiste Maneyrol , Jonathan Cameron Subject: Re: [PATCH 6.6.y] iio: imu: inv_icm42600: fix odr switch when turning buffer off Message-ID: <2026031713-program-cedar-3f3f@gregkh> References: <2026031710-candle-hypnotism-fa31@gregkh> <20260317151940.343916-1-inv.git-commit@tdk.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260317151940.343916-1-inv.git-commit@tdk.com> On Tue, Mar 17, 2026 at 03:19:40PM +0000, inv.git-commit@tdk.com wrote: > From: Jean-Baptiste Maneyrol > > ODR switch is done in 2 steps when FIFO is on : change the ODR register > value and acknowledge change when reading the FIFO ODR change flag. > When we are switching odr and turning buffer off just afterward, we are > losing the FIFO ODR change flag and ODR switch is blocked. > > Fix the issue by force applying any waiting ODR change when turning > buffer off. > > Fixes: ec74ae9fd37c ("iio: imu: inv_icm42600: add accurate timestamping") > Signed-off-by: Jean-Baptiste Maneyrol > Cc: stable@vger.kernel.org > Signed-off-by: Jonathan Cameron > --- > drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c > index aca6ce758890..743580ea5845 100644 > --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c > +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c > @@ -378,6 +378,7 @@ static int inv_icm42600_buffer_predisable(struct iio_dev *indio_dev) > static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev) > { > struct inv_icm42600_state *st = iio_device_get_drvdata(indio_dev); > + struct inv_sensors_timestamp *ts = iio_priv(indio_dev); > struct device *dev = regmap_get_device(st->map); > unsigned int sensor; > unsigned int *watermark; > @@ -399,6 +400,8 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev) > > mutex_lock(&st->lock); > > + inv_sensors_timestamp_apply_odr(ts, 0, 0, 0); > + > ret = inv_icm42600_buffer_set_fifo_en(st, st->fifo.en & ~sensor); > if (ret) > goto out_unlock; > -- > 2.25.1 > > This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.