linux/drivers/ptp
Vladimir Oltean 40b0425f8b net: ptp: create a mock-up PTP Hardware Clock driver
There are several cases where virtual net devices may benefit from
having a PTP clock, and these have to do with testing. I can see at
least netdevsim and veth as potential users of a common mock-up PTP
hardware clock driver.

The proposed idea is to create an object which emulates PTP clock
operations on top of the unadjustable CLOCK_MONOTONIC_RAW plus a
software-controlled time domain via a timecounter/cyclecounter and then
link that PHC to the netdevsim device.

The driver is fully functional for its intended purpose, and it
successfully passes the PTP selftests.

$ cd tools/testing/selftests/ptp/
$ ./phc.sh /dev/ptp2
TEST: settime                          [ OK ]
TEST: adjtime                          [ OK ]
TEST: adjfreq                          [ OK ]

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20230807193324.4128292-7-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-09 15:59:21 -07:00
..
Kconfig net: ptp: create a mock-up PTP Hardware Clock driver 2023-08-09 15:59:21 -07:00
Makefile net: ptp: create a mock-up PTP Hardware Clock driver 2023-08-09 15:59:21 -07:00
ptp_chardev.c ptp: Add .getmaxphase callback to ptp_clock_info 2023-06-20 09:02:33 +01:00
ptp_clock.c ptp: Add .getmaxphase callback to ptp_clock_info 2023-06-20 09:02:33 +01:00
ptp_clockmatrix.c ptp: ptp_clockmatrix: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_clockmatrix.h ptp: ptp_clockmatrix: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_dfl_tod.c
ptp_dte.c
ptp_idt82p33.c ptp: idt82p33: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_idt82p33.h ptp: idt82p33: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_ines.c
ptp_kvm_arm.c
ptp_kvm_common.c
ptp_kvm_x86.c
ptp_mock.c net: ptp: create a mock-up PTP Hardware Clock driver 2023-08-09 15:59:21 -07:00
ptp_ocp.c ptp: ocp: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_pch.c
ptp_private.h
ptp_qoriq_debugfs.c
ptp_qoriq.c ptp: Explicitly include correct DT includes 2023-07-18 11:27:49 +02:00
ptp_sysfs.c ptp: Make max_phase_adjustment sysfs device attribute invisible when not supported 2023-07-03 13:17:25 -07:00
ptp_vclock.c
ptp_vmw.c