]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ptp: Add ioctl commands to expose raw cycle counter values
authorCarolina Jubran <cjubran@nvidia.com>
Tue, 12 Aug 2025 14:17:06 +0000 (17:17 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 9 Sep 2025 07:33:24 +0000 (09:33 +0200)
commitfaf23f54d366467bb449a7b2c39b382db9f92e80
tree0db7ad9b40c9346eb9aaa800f8ee874083031d65
parent9f0730b063b436938ebb6371aecb12ec6ed896e9
ptp: Add ioctl commands to expose raw cycle counter values

Introduce two new ioctl commands, PTP_SYS_OFFSET_PRECISE_CYCLES and
PTP_SYS_OFFSET_EXTENDED_CYCLES, to allow user space to access the
raw free-running cycle counter from PTP devices.

These ioctls are variants of the existing PRECISE and EXTENDED
offset queries, but instead of returning device time in realtime,
they return the raw cycle counter value.

Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://patch.msgid.link/1755008228-88881-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/ptp/ptp_chardev.c
include/uapi/linux/ptp_clock.h