leds: trigger: netdev: introduce check for possible hw control
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 May 2023 16:32:35 +0000 (18:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2023 08:42:08 +0000 (09:42 +0100)
commit4fd1b6d47a7a38e81fdc6f8be2ccd4216b3f93db
tree2ee0aa50a3f1fc4870ec1b0b69872a05414a51de
parent28a6a2ef18ad840a390d519840c303b03040961c
leds: trigger: netdev: introduce check for possible hw control

Introduce function to check if the requested mode can use hw control in
preparation for hw control support. Currently everything is handled in
software so can_hw_control will always return false.

Add knob with the new value hw_control in trigger_data struct to
set hw control possible. Useful for future implementation to implement
in set_baseline_state() the required function to set the requested mode
using LEDs hw control ops and in other function to reject set if hw
control is currently active.

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