Thread (13 messages) 13 messages, 3 authors, 2024-03-22

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

From: Josua Mayer <hidden>
Date: 2024-03-22 18:33:31

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 <andrew@lunn.ch>
---
...

+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help