Re: [PATCH net-next 3/3] net: phy: dap8211r: add led hardware control support

From: Artem Shimko

Date: Sat Nov 14 2026 - 08:37:37 EST


Hi Andrew,

On Fri, Nov 13, 2026 at 11:32 PM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > +#define DAP8211R_LED_ACT_BLINK BIT(13)
> > +#define DAP8211R_LED_FULL_DUPLEX BIT(12)
> > +#define DAP8211R_LED_HALF_DUPLEX BIT(11)
> > +#define DAP8211R_LED_TX BIT(10)
> > +#define DAP8211R_LED_RX BIT(9)
> > +#define DAP8211R_LED_LINK_1000 BIT(6)
> > +#define DAP8211R_LED_LINK_100 BIT(5)
> > +#define DAP8211R_LED_LINK_10 BIT(4)
>
> Do any of these bits allow forced on/off?

These bits only control the indication of connection status, speed,
duplex mode, and activity.

The LED_COMCON register does include "force-on/force-off" bits,
but i have intentionally chosen not to use them here.
To be honest, i’m not yet convinced that they need to be added.

In any case, if you think they are needed, i'll add them.

> > +static int dap8211r_led_hw_is_supported(struct phy_device *phydev, u8 index, unsigned long rules)
> > +{
> > + switch (index) {
> > + case DAP8211R_LED_ID_0:
> > + fallthrough;
> > + case DAP8211R_LED_ID_1:
> > + fallthrough;
> > + case DAP8211R_LED_ID_2:
> > + break;
>
> You can collapse case statements, without fallthrough, if there is no
> code.
>
> It is also possible to do:
>
> case DAP8211R_LED_ID_0..DAP8211R_LED_ID_2:

Agreed =)

Thank you for your review.

Best regards,
artem