]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge branch 'net-stmmac-allow-generation-of-flexible-pps-relative-to-mac-time'
authorJakub Kicinski <kuba@kernel.org>
Wed, 3 Sep 2025 23:51:12 +0000 (16:51 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 3 Sep 2025 23:51:12 +0000 (16:51 -0700)
Gatien Chevallier says:

====================
net: stmmac: allow generation of flexible PPS relative to MAC time

When doing some testing on stm32mp2x platforms(MACv5), I noticed that
the command previously used with a MACv4 for genering a PPS signal:
echo "0 0 0 1 1" > /sys/class/ptp/ptp0/period
did not work.

This is because the arguments passed through this command must contain
the start time at which the PPS should be generated, relative to the
MAC system time. For some reason, a time set in the past seems to work
with a MACv4.

Because passing such an argument is tedious, consider that any time
set in the past is an offset regarding the MAC system time. This way,
this does not impact existing scripts and the past time use case is
handled. Edit: But maybe that's not important and we can just change
the default behavior to this.

Example to generate a flexible PPS signal that has a 1s period 3s
relative to when the command was entered:

echo "0 3 0 1 1" > /sys/class/ptp/ptp0/period
====================

Link: https://patch.msgid.link/20250901-relative_flex_pps-v4-0-b874971dfe85@foss.st.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Trivial merge