Re: [PATCH v8 04/12] iio: ssp_sensors: factor out MCU enable/disable helpers

From: Andy Shevchenko

Date: Sun May 17 2026 - 06:39:11 EST


On Fri, May 15, 2026 at 11:10:09PM +0530, Sanjay Chitroda wrote:

> Refactor the MCU enable and disable logic into small helper functions.
> This simplifies the control flow and improves readability.
>
> No functional change intended.

...

> + if (!data->shut_down)
> + return;

> + data->shut_down = false;

Strictly speaking this should go to the end of the function. However for the
proper synchronisation it might need a lock, but I think it's done in the upper
layer and disable/enable pair is never called in parallel.

> + enable_irq(data->spi->irq);
> + enable_irq_wake(data->spi->irq);

--
With Best Regards,
Andy Shevchenko