leds: trigger: netdev: expose netdev trigger modes in linux include
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 May 2023 16:32:41 +0000 (18:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2023 08:42:09 +0000 (09:42 +0100)
Expose netdev trigger modes to make them accessible by LED driver that
will support netdev trigger for hw control.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/leds/trigger/ledtrig-netdev.c
include/linux/leds.h

index e8bb9d0f85c06949b7d3edaf8c5967d5dfeea64f..b0a6f274955200cf49974053b1ee4e7c65d9f364 100644 (file)
@@ -56,15 +56,6 @@ struct led_netdev_data {
        bool hw_control;
 };
 
-enum led_trigger_netdev_modes {
-       TRIGGER_NETDEV_LINK = 0,
-       TRIGGER_NETDEV_TX,
-       TRIGGER_NETDEV_RX,
-
-       /* Keep last */
-       __TRIGGER_NETDEV_MAX,
-};
-
 static void set_baseline_state(struct led_netdev_data *trigger_data)
 {
        int current_brightness;
index 3268b4e789d627793034dfbdf80e9406562b31aa..8af62ff431f024a0cbfc7676dfced4e4ecb01249 100644 (file)
@@ -552,6 +552,16 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
 
 #endif /* CONFIG_LEDS_TRIGGERS */
 
+/* Trigger specific enum */
+enum led_trigger_netdev_modes {
+       TRIGGER_NETDEV_LINK = 0,
+       TRIGGER_NETDEV_TX,
+       TRIGGER_NETDEV_RX,
+
+       /* Keep last */
+       __TRIGGER_NETDEV_MAX,
+};
+
 /* Trigger specific functions */
 #ifdef CONFIG_LEDS_TRIGGER_DISK
 void ledtrig_disk_activity(bool write);