summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_target.rs
diff options
context:
space:
mode:
authorWei Fang <wei.fang@nxp.com>2025-09-05 11:07:10 +0800
committerJakub Kicinski <kuba@kernel.org>2025-09-09 19:28:52 -0700
commit67ac836373f457aaef918aa6ba96e9c663c57368 (patch)
tree25e8f7acd73a2468bc7bf6b0756244485fc4bbeb /scripts/generate_rust_target.rs
parente096a7cc0be126d9376e549a10d71cf16b1a1c1c (diff)
ptp: netc: add the periodic output signal loopback support
The NETC Timer supports looping back the output pulse signal of Fiper-n into Trigger-n input, so that users can leverage this feature to validate some other features without external hardware support. For example, users can use it to test external trigger stamp (EXTTS). And users can combine EXTTS with loopback mode to check whether the generation time of PPS is aligned with an integral second of PHC, or the periodic output signal (PTP_CLK_REQ_PEROUT) whether is generated at the specified time. Since ptp_clock_info::perout_loopback() has been added to the ptp_clock driver as a generic interface to enable or disable the periodic output signal loopback, therefore, netc_timer_perout_loopback() is added as a callback of ptp_clock_info::perout_loopback(). Test the generation time of PPS event: $ echo 0 1 > /sys/kernel/debug/ptp0/perout_loopback $ echo 1 > /sys/class/ptp/ptp0/pps_enable $ testptp -d /dev/ptp0 -e 3 external time stamp request okay event index 0 at 63.000000017 event index 0 at 64.000000017 event index 0 at 65.000000017 Test the generation time of the periodic output signal: $ echo 0 1 > /sys/kernel/debug/ptp0/perout_loopback $ echo 0 150 0 1 500000000 > /sys/class/ptp/ptp0/period $ testptp -d /dev/ptp0 -e 3 external time stamp request okay event index 0 at 150.000000014 event index 0 at 151.500000015 event index 0 at 153.000000014 Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20250905030711.1509648-3-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions