summaryrefslogtreecommitdiff
path: root/drivers/ptp
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2022-03-04 08:46:15 +0300
committerJakub Kicinski <kuba@kernel.org>2022-03-05 07:59:50 +0300
commit61fd7ac2152237c3aa4057de81b98cb9a4967cd7 (patch)
tree30c633ef54d15f68c7c36301a3064c5770e73a38 /drivers/ptp
parent349fa2796e5235d81df6e01f122e75124e34b859 (diff)
downloadlinux-61fd7ac2152237c3aa4057de81b98cb9a4967cd7.tar.xz
ptp: ocp: Add serial port information to the debug summary
On the debug summary page, show the /dev/ttyS<port> mapping. Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Link: https://lore.kernel.org/r/20220304054615.1737-1-jonathan.lemon@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/ptp')
-rw-r--r--drivers/ptp/ptp_ocp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 608d1a0eb141..aaefca6c2422 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -2109,6 +2109,14 @@ ptp_ocp_summary_show(struct seq_file *s, void *data)
sma_out = ioread32(&bp->sma->gpio2);
seq_printf(s, "%7s: /dev/ptp%d\n", "PTP", ptp_clock_index(bp->ptp));
+ if (bp->gnss_port != -1)
+ seq_printf(s, "%7s: /dev/ttyS%d\n", "GNSS1", bp->gnss_port);
+ if (bp->gnss2_port != -1)
+ seq_printf(s, "%7s: /dev/ttyS%d\n", "GNSS2", bp->gnss2_port);
+ if (bp->mac_port != -1)
+ seq_printf(s, "%7s: /dev/ttyS%d\n", "MAC", bp->mac_port);
+ if (bp->nmea_port != -1)
+ seq_printf(s, "%7s: /dev/ttyS%d\n", "NMEA", bp->nmea_port);
sma1_show(dev, NULL, buf);
seq_printf(s, " sma1: %s", buf);