Re: [PATCH net-next v5 3/3] net: phy: dap8211r: add PHY LED control support

From: Artem Shimko

Date: Wed Nov 25 2026 - 06:50:58 EST


Hi Andrew,

On Wed, Nov 25, 2026 at 12:47 AM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> On Tue, Nov 24, 2026 at 12:49:12PM +0300, Artem Shimko wrote:
> > Add support for hardware-controlled LEDs and brightness on the DAP8211R
> > PHY. The chip exposes three LEDs that can be programmed to react to link,
> > speed, duplex, and TX/RX activity or be driven via the force mode.
> >
> > Add the dap8211r_write_ext() helper to access extended registers via the
> > PHY indirect access registers, and implement callbacks for:
> > led_brightness_set(), led_hw_is_supported(), led_hw_control_set(),
> > led_hw_control_get().
> >
> > Signed-off-by: Artem Shimko <a.shimko.dev@xxxxxxxxx>
>
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
>

Thank you for the review!

Sashiko AI flagged a Medium issue in dap8211r_led_hw_control_get():
the function returns 0 even when LED_x_CON holds a state that cannot
be expressed as rules (TX/RX without ACT_BLINK, or ACT_BLINK without
TX/RX). I'd like to send a v6 that adds:

if (!!(led_mode & DAP8211R_LED_ACT_BLINK) !=
!!(led_mode & (DAP8211R_LED_RX | DAP8211R_LED_TX)))
return -EOPNOTSUPP;

May i keep your Reviewed-by tag on
v6, given that this is a small, targeted fix?

--
Best regards,
artem