Re: [net-next PATCH v2] net: phy: Validate PHY LED OPs presence before registering
From: Christian Marangi
Date: Tue Oct 08 2024 - 09:14:21 EST
On Tue, Oct 08, 2024 at 03:08:32PM +0200, Andrew Lunn wrote:
> > + /* Check if the PHY driver have at least an OP to
> > + * set the LEDs.
> > + */
> > + if (!phydev->drv->led_brightness_set &&
> > + !phydev->drv->led_blink_set &&
> > + !phydev->drv->led_hw_control_set) {
>
> I think this condition is too strong. All that should be required is
> led_brightness_set(). The rest can be done in software.
>
Mhh the idea was really to check if one of the 3 is declared. Ideally to
future proof case where some led will only expose led_hw_control_set or
only led_blink_set?
--
Ansuel