Re: [PATCH] net: pse-pd: add LED trigger support

From: Oleksij Rempel

Date: Sun Mar 15 2026 - 12:58:32 EST


Hi Carlo,

On Sun, Mar 15, 2026 at 12:59:16AM +0100, Carlo Szelinsky wrote:
> Add LED trigger registration and polling into the PSE core subsystem.
> Per-PI "delivering" and "enabled" triggers are registered for each PSE
> controller, with a configurable poll interval via the DT property
> "led-poll-interval-ms".

Nice work. However, this needs an architectural shift.

Since the hardware lacks interrupts, we need a core polling mechanism.
However, the PSE core already has an event notification framework. The
new polling should integrate with it instead of being LED-specific.

Please consider this approach:

- Add a generic polling loop in the PSE core. It should simulate the IRQ
handler pse_isr() by detecting state changes and pushing standard
events into the existing ntf_fifo to be processed by
pse_send_ntf_worker()

- Do not poll inside the LED code. The core state tracker should trigger
LED events as a reaction to state changes.

- Please add a define for the default polling interval. Include a
comment explaining why this specific value is chosen.

@Köry, How should we decide when to enable polling? Should we check if
no IRQ is registered? Or add a flag if the controller lacks IRQ support?

@Carlo, What controller are you using?

Best Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |