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)