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

From: Andrew Lunn

Date: Fri Nov 13 2026 - 15:46:38 EST


> +#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?

> +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:

Andrew