The ptp pin function programming does not allow calibration pin to change
function. This is problematic on hardware that uses the default calibration
pin for other purposes.
Removing this limitation does not impact calibration if userspace does not
reprogram the calibration pin.
Signed-off-by: Stefan Sørensen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This patch adds a pair of new ioctls to the PTP Hardware Clock device
interface. Using the ioctls, user space programs can query each pin to
find out its current function and also reprogram a different function
if desired.
Signed-off-by: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This patch removes the large buffer from the stack of the system
offset ioctl and replaces it with a kmalloced buffer.
Signed-off-by: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This patch removes the large buffer from the stack of the read file
operation and replaces it with a kmalloced buffer.
Signed-off-by: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]>
Acked-by: Jacob Keller <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
In ptp_read there is an unlock missing on an error path, and a double
unlock on another error path.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Richard Cochran <[email protected]>
Signed-off-by: John Stultz <[email protected]>
copy_to_user() returns the number of bytes remaining, but we want a
negative error code in ptp_ioctl.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Richard Cochran <[email protected]>
Signed-off-by: John Stultz <[email protected]>
This patch adds an infrastructure for hardware clocks that implement
IEEE 1588, the Precision Time Protocol (PTP). A class driver offers a
registration method to particular hardware clock drivers. Each clock is
presented as a standard POSIX clock.
The ancillary clock features are exposed in two different ways, via
the sysfs and by a character device.
Signed-off-by: Richard Cochran <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: John Stultz <[email protected]>