Skip to content

Commit

Permalink
leds: trigger: netdev: expose netdev trigger modes in linux include
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Marangi authored and David S. Miller committed May 31, 2023
1 parent 0316cc5 commit 947acac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/leds/trigger/ledtrig-netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions include/linux/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 947acac

Please sign in to comment.