Re: [PATCH v8 5/6] hwmon: add NXP MC33978/MC34978 driver

Guenter Roeck
2026-03-29T15:31:48Z

On 3/29/26 02:06, Oleksij Rempel wrote:
> Add hardware monitoring support for the NXP MC33978/MC34978 Multiple
> Switch Detection Interface (MSDI).
>
> The hardware utilizes a clear-on-read FAULT register, but physical
> faults remain asserted as long as the underlying condition exists. This
> asserts a global FAULT_STAT bit on the SPI bus. To handle this without
> trapping the CPU in an interrupt storm, this driver implements the
> following architecture:
> - Requests a rising-edge nested IRQ (IRQF_TRIGGER_RISING) from the MFD
> core to catch the initial 0 -> 1 transition of the global fault state.
> - Caches hwmon-specific alarm bits and calculates state edges (XOR) to
> isolate alarm transitions from system integrity faults.
> - Implements a 1Hz delayed workqueue that polls the hardware as long as
> any alarm is active. This compensates for the edge-triggered IRQ by
> discovering secondary faults that occur without a rising edge, and
> detecting when the hardware clears.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Acked-by: Guenter Roeck <linux@roeck-us.net>