OSDN Git Service

net: dsa: qca8k: implement hw_control ops
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 May 2023 16:32:42 +0000 (18:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2023 08:42:09 +0000 (09:42 +0100)
commite0256648c831af13cbfe4a1787327fcec01c2807
tree2ca754ce3f26b7774fb0a47d408d2ac23248770d
parent947acacab5ea151291b861cdfbde16ff5cf1b08c
net: dsa: qca8k: implement hw_control ops

Implement hw_control ops to drive Switch LEDs based on hardware events.

Netdev trigger is the declared supported trigger for hw control
operation and supports the following mode:
- tx
- rx

When hw_control_set is called, LEDs are set to follow the requested
mode.
Each LEDs will blink at 4Hz by default.

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/net/dsa/qca/qca8k-leds.c