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)
commit7d9ee2e8ff1541c60dcb5cfdf41def9659204c3e
tree2671911107d274ba7737cc69cc5ae7a8a783d5d4
parentf0d4ba9eff75a79fccb7793f4d9f12303d458603
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