[PATCH net-next 2/2] net: phy: mtk-ge-soc: Fix LED behavior if blinking is not set.

Andrew Lunn andrew at lunn.ch
Fri May 23 09:07:49 PDT 2025


On Fri, May 23, 2025 at 07:36:01PM +0800, Sky Huang wrote:
> From: Sky Huang <skylake.huang at mediatek.com>
> 
> If delay_on==0 and delay_off==0 are passed to
> mt798x_2p5ge_phy_led_blink_set() and mtk_phy_led_num_dly_cfg(),
> blinking is actually not set. So don't clean "LED on" status under
> this circumstance.

Actually, i think mtk_phy_led_num_dly_cfg() is wrong.

https://docs.kernel.org/leds/leds-class.html#hardware-accelerated-blink-of-leds

   The blink_set() function should choose a user friendly blinking
   value if it is called with *delay_on==0 && *delay_off==0
   parameters. In this case the driver should give back the chosen
   value through delay_on and delay_off parameters to the leds
   subsystem.

That is not what mtk_phy_led_num_dly_cfg() does.

    Andrew

---
pw-bot: cr



More information about the Linux-mediatek mailing list