Subject: Re: [PATCH RFC 2/7] net: Add helpers for netdev LEDs

From: Josua Mayer <[email-masked]>
Date: Fri, 22 Mar 2024 18:33:28 +0000

Am 17.03.24 um 22:45 schrieb Andrew Lunn:
> Add a set of helpers for parsing the standard device tree properties
> for LEDs are part of an ethernet device, and registering them with the
> LED subsystem. This code can be used by any sort of netdev driver, DSA
> switch or pure switchdev switch driver.
>
> Signed-off-by: Andrew Lunn <[email-masked]>
> ---
> ...
>
> +struct netdev_leds_ops {
> +	int (*brightness_set)(struct net_device *ndev, u8 led,
> +			      enum led_brightness brightness);
> +	int (*blink_set)(struct net_device *ndev, u8 led,
> +			 unsigned long *delay_on,  unsigned long *delay_off);
> +	int (*hw_control_is_supported)(struct net_device *ndev, u8 led,
> +				       unsigned long flags);
> +	int (*hw_control_set)(struct net_device *ndev, u8 led,
> +			      unsigned long flags);
> +	int (*hw_control_get)(struct net_device *ndev, u8 led,
> +			      unsigned long *flags);
> +};
I noticed phy.h calls the "flags" argument "rules" instead,
perhaps that is more suitable.