Skip to content

Commit 61fd7ac

Browse files
jlemonkuba-moo
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 349fa27 commit 61fd7ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/ptp/ptp_ocp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,6 +2109,14 @@ ptp_ocp_summary_show(struct seq_file *s, void *data)
21092109
sma_out = ioread32(&bp->sma->gpio2);
21102110

21112111
seq_printf(s, "%7s: /dev/ptp%d\n", "PTP", ptp_clock_index(bp->ptp));
2112+
if (bp->gnss_port != -1)
2113+
seq_printf(s, "%7s: /dev/ttyS%d\n", "GNSS1", bp->gnss_port);
2114+
if (bp->gnss2_port != -1)
2115+
seq_printf(s, "%7s: /dev/ttyS%d\n", "GNSS2", bp->gnss2_port);
2116+
if (bp->mac_port != -1)
2117+
seq_printf(s, "%7s: /dev/ttyS%d\n", "MAC", bp->mac_port);
2118+
if (bp->nmea_port != -1)
2119+
seq_printf(s, "%7s: /dev/ttyS%d\n", "NMEA", bp->nmea_port);
21122120

21132121
sma1_show(dev, NULL, buf);
21142122
seq_printf(s, " sma1: %s", buf);

0 commit comments

Comments
 (0)