]> 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)
commit3fa6a7a87dd71b56746967e88ef4899b16452d37
tree2671911107d274ba7737cc69cc5ae7a8a783d5d4
parent43d8b475e2eb7167e84efdf6bcd4b64c5e3e3074
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