From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: jean-baptiste.maneyrol@tdk.com,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Jean-Baptiste Maneyrol" <jmaneyrol@invensense.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] iio: imu: inv_icm42600: change invalid data error to EBUSY
Date: Mon, 11 Aug 2025 21:36:07 +0100 [thread overview]
Message-ID: <20250811213607.7bf4b91c@jic23-huawei> (raw)
In-Reply-To: <CAHp75Vcw5Q_ENzEJvH2+xHmPD-DUPAEaOOD2QoiCXoh7UiQJxQ@mail.gmail.com>
On Fri, 8 Aug 2025 14:35:00 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Fri, Aug 8, 2025 at 9:40 AM Jean-Baptiste Maneyrol via B4 Relay
> <devnull+jean-baptiste.maneyrol.tdk.com@kernel.org> wrote:
> >
> > Temperature sensor returns the temperature of the mechanical parts
> > of the chip. If both accel and gyro are off, temperature sensor is
>
> the temperature
>
> > also automatically turned off and return invalid data.
>
> returns
>
> > In this case, returning EBUSY error code is better then EINVAL and
>
> -EBUSY
> than
> -EINVAL
>
> > indicates userspace that it needs to retry reading temperature in
> > another context.
>
> ...
>
> > + /*
> > + * Temperature data is invalid if both accel and gyro are off.
> > + * Return EBUSY in this case.
>
> -EBUSY
>
> > + */
> > if (*temp == INV_ICM42600_DATA_INVALID)
> > - ret = -EINVAL;
> > + ret = -EBUSY;
> >
> > exit:
> > mutex_unlock(&st->lock);
>
> ...
>
> No need to resend just for the above, I hope Jonathan tweaks this
> whilst applying.
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
> (assuming typos and signs are fixed)
>
Tweaked an applied to the fixes-togreg branch of iio.git.
I've not marked this explicitly for stable as it's a kind of weird
sort of 'fix'. If anyone wants is backported, then maybe we can consider
that once it's upstream
Jonathan
next prev parent reply other threads:[~2025-08-11 20:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 7:40 [PATCH] iio: imu: inv_icm42600: change invalid data error to EBUSY Jean-Baptiste Maneyrol via B4 Relay
2025-08-08 12:35 ` Andy Shevchenko
2025-08-11 20:36 ` Jonathan Cameron [this message]
2025-08-09 19:24 ` Jonathan Cameron
2025-08-11 9:49 ` Sean Nyekjaer
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=20250811213607.7bf4b91c@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=jmaneyrol@invensense.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@vger.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