Re: [PATCH] iio: imu: lsm6dsx: Add shutdown callback support for I3C interface
From: David Lechner
Date: Mon Jul 21 2025 - 17:01:35 EST
On 7/21/25 6:38 AM, Andy Shevchenko wrote:
> On Mon, Jul 21, 2025 at 04:37:41PM +0530, Manikanta Guntupalli wrote:
>> Add a shutdown handler for the ST LSM6DSx I3C driver to perform a hardware
>> reset during system shutdown. This ensures the sensor is placed in a
>> well-defined reset state, preventing issues during subsequent reboots,
>> such as kexec, where the device may fail to respond correctly during
>> enumeration.
>
> Do you imply that tons of device drivers missing this? I don't think we have
> even 5% of the drivers implementing the feature.
>
In the IIO drivers I've worked on, we always do reset in the probe()
function. The shutdown() function might not run, e.g. if the board
loses power, so it doesn't fix 100% of the cases.