]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: add an ioctl to compare PHC time with system time
authorRichard Cochran <richardcochran@gmail.com>
Wed, 31 Oct 2012 06:19:07 +0000 (06:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Nov 2012 15:41:34 +0000 (11:41 -0400)
commitb90e04e3692b2b7a157a779da9a2370fe5f43682
treef4963077f13ab200a676636fe2d48993e73a2a8a
parent9d64da96b72315e7bedbd3e1465c9b111ce647b3
ptp: add an ioctl to compare PHC time with system time

This patch adds an ioctl for PTP Hardware Clock (PHC) devices that allows
user space to measure the time offset between the PHC and the system
clock. Rather than hard coding any kind of estimation algorithm into the
kernel, this patch takes the more flexible approach of just delivering
an array of raw clock readings. In that way, the user space clock servo
may be adapted to new and different hardware clocks.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_chardev.c
include/uapi/linux/ptp_clock.h