net: dsa: microchip: ptp: add support for perout programmable pins
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 10 Jan 2023 08:49:28 +0000 (14:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jan 2023 08:40:41 +0000 (08:40 +0000)
commit343d3bd87a2835e61790ffb5d3638a070f12292b
tree5aa4a591f1a59d3c8d6b0743c50442cf579a6313
parent1f12ae5b67608f63596642774129abfafa95e9d8
net: dsa: microchip: ptp: add support for perout programmable pins

There are two programmable pins available for Trigger output unit to
generate periodic pulses. This patch add verify_pin for the available 2
pins and configure it with respect to GPIO index for the TOU unit.

Tested using testptp
./testptp -i 0 -L 0,2
./testptp -i 0 -d /dev/ptp0 -p 1000000000
./testptp -i 1 -L 1,2
./testptp -i 1 -d /dev/ptp0 -p 100000000

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp.h