[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB8510D6DE4F62F90EDE0C56AE883BA@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Thu, 28 Aug 2025 02:04:02 +0000
From: Wei Fang <wei.fang@....com>
To: Frank Li <frank.li@....com>
CC: "robh@...nel.org" <robh@...nel.org>, "krzk+dt@...nel.org"
<krzk+dt@...nel.org>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
"richardcochran@...il.com" <richardcochran@...il.com>, Claudiu Manoil
<claudiu.manoil@....com>, Vladimir Oltean <vladimir.oltean@....com>, Clark
Wang <xiaoning.wang@....com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"vadim.fedorenko@...ux.dev" <vadim.fedorenko@...ux.dev>,
"shawnguo@...nel.org" <shawnguo@...nel.org>, "F.S. Peng"
<fushi.peng@....com>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>
Subject: RE: [PATCH v6 net-next 04/17] ptp: add debugfs interfaces to loop
back the periodic output signal
> On Wed, Aug 27, 2025 at 02:33:19PM +0800, Wei Fang wrote:
> > For some PTP devices, they have the capability to loop back the
> > periodic output signal for debugging, such as the ptp_qoriq device. So
> > add the generic interfaces to set the periodic output signal loopback,
> > rather than each vendor having a different implementation.
> >
> > Show how many channels support the periodic output signal loopback:
> > $ cat /sys/kernel/debug/ptp<N>/n_perout_loopback
> >
> > Enable the loopback of the periodic output signal of channel X:
> > $ echo <X> 1 > /sys/kernel/debug/ptp<N>/perout_loopback
>
> Genernally sys interface only 1 input for each entry.
>
> I suggest create one file for each channel.
>
> /sys/kernel/debug/ptp<N>/perout<m>_loopback_enable
>
> echo 1 > /sys/kernel/debug/ptp<N>/perout<m>_loopback_enable
>
There is actually only one parameter, which is a string and is parsed by
the driver. This practice is actually quite common. see:
ixgbe_debugfs.c : ixgbe_dbg_reg_ops_write()
debugfs_sta.c: ath11k_dbg_sta_write_delba()
wil6210/debugfs.c: wil_write_back()
ath10k/debug.c: ath10k_write_htt_max_amsdu_ampdu()
Powered by blists - more mailing lists