• Christian Marangi's avatar
    leds: trigger: netdev: add support for LED hw control · 7c145a34
    Christian Marangi authored
    Add support for LED hw control for the netdev trigger.
    
    The trigger on calling set_baseline_state to configure a new mode, will
    do various check to verify if hw control can be used for the requested
    mode in can_hw_control() function.
    
    It will first check if the LED driver supports hw control for the netdev
    trigger, then will use hw_control_is_supported() and finally will call
    hw_control_set() to apply the requested mode.
    
    To use such mode, interval MUST be set to the default value and net_dev
    MUST be set. If one of these 2 value are not valid, hw control will
    never be used and normal software fallback is used.
    
    The default interval value is moved to a define to make sure they are
    always synced.
    Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7c145a34
ledtrig-netdev.c 12.6 KB