]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: hellcreek: Add PTP status LEDs
authorKurt Kanzenbach <kurt@linutronix.de>
Tue, 3 Nov 2020 07:10:59 +0000 (08:10 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Nov 2020 22:04:50 +0000 (14:04 -0800)
commitae00d6af786441d6f3d6e1edebeb3091a75308c1
tree2671911107d274ba7737cc69cc5ae7a8a783d5d4
parent05838cdefa6345882355ff47226325ed8a6124e2
net: dsa: hellcreek: Add PTP status LEDs

The switch has two controllable I/Os which are usually connected to LEDs. This
is useful to immediately visually see the PTP status.

These provide two signals:

 * is_gm

   This LED can be activated if the current device is the grand master in that
   PTP domain.

 * sync_good

   This LED can be activated if the current device is in sync with the network
   time.

Expose these via the LED framework to be controlled via user space
e.g. linuxptp.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/hirschmann/hellcreek.h
drivers/net/dsa/hirschmann/hellcreek_ptp.c
drivers/net/dsa/hirschmann/hellcreek_ptp.h