mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
leds: trigger: netdev: expose netdev trigger modes in linux include
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>
This commit is contained in:
parent
0316cc5629
commit
947acacab5
2 changed files with 10 additions and 9 deletions
|
@ -56,15 +56,6 @@ struct led_netdev_data {
|
||||||
bool hw_control;
|
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)
|
static void set_baseline_state(struct led_netdev_data *trigger_data)
|
||||||
{
|
{
|
||||||
int current_brightness;
|
int current_brightness;
|
||||||
|
|
|
@ -552,6 +552,16 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
|
||||||
|
|
||||||
#endif /* CONFIG_LEDS_TRIGGERS */
|
#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 */
|
/* Trigger specific functions */
|
||||||
#ifdef CONFIG_LEDS_TRIGGER_DISK
|
#ifdef CONFIG_LEDS_TRIGGER_DISK
|
||||||
void ledtrig_disk_activity(bool write);
|
void ledtrig_disk_activity(bool write);
|
||||||
|
|
Loading…
Add table
Reference in a new issue