Re: [PATCH] iio: imu: lsm6dsx: Add shutdown callback support for I3C interface

From: Andy Shevchenko
Date: Mon Jul 21 2025 - 07:42:26 EST


On Mon, Jul 21, 2025 at 02:38:42PM +0300, 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.
>
> > To support this, the previously static st_lsm6dsx_reset_device() function
> > is now exported via EXPORT_SYMBOL_NS() under the IIO_LSM6DSX namespace,
> > allowing it to be invoked from the I3C-specific driver.
>
> Why system suspend callback can't do this?

Ah, and why only I3C is important? Doesn't I2C or SPI also broken in this sense?

--
With Best Regards,
Andy Shevchenko