Commit 329f0041 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

docs: ptp.txt: convert to ReST and move to driver-api

The conversion is trivial: just adjust title markups.

In order to avoid conflicts, let's add an :orphan: tag
to it, to be removed when this file gets added to the
driver-api book.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 28aedd7e
:orphan:
* PTP hardware clock infrastructure for Linux ===========================================
PTP hardware clock infrastructure for Linux
===========================================
This patch set introduces support for IEEE 1588 PTP clocks in This patch set introduces support for IEEE 1588 PTP clocks in
Linux. Together with the SO_TIMESTAMPING socket options, this Linux. Together with the SO_TIMESTAMPING socket options, this
...@@ -22,7 +25,8 @@ ...@@ -22,7 +25,8 @@
- Period output signals configurable from user space - Period output signals configurable from user space
- Synchronization of the Linux system time via the PPS subsystem - Synchronization of the Linux system time via the PPS subsystem
** PTP hardware clock kernel API PTP hardware clock kernel API
=============================
A PTP clock driver registers itself with the class driver. The A PTP clock driver registers itself with the class driver. The
class driver handles all of the dealings with user space. The class driver handles all of the dealings with user space. The
...@@ -36,7 +40,8 @@ ...@@ -36,7 +40,8 @@
development, it can be useful to have more than one clock in a development, it can be useful to have more than one clock in a
single system, in order to allow performance comparisons. single system, in order to allow performance comparisons.
** PTP hardware clock user space API PTP hardware clock user space API
=================================
The class driver also creates a character device for each The class driver also creates a character device for each
registered clock. User space can use an open file descriptor from registered clock. User space can use an open file descriptor from
...@@ -49,7 +54,8 @@ ...@@ -49,7 +54,8 @@
ancillary clock features. User space can receive time stamped ancillary clock features. User space can receive time stamped
events via blocking read() and poll(). events via blocking read() and poll().
** Writing clock drivers Writing clock drivers
=====================
Clock drivers include include/linux/ptp_clock_kernel.h and register Clock drivers include include/linux/ptp_clock_kernel.h and register
themselves by presenting a 'struct ptp_clock_info' to the themselves by presenting a 'struct ptp_clock_info' to the
...@@ -66,14 +72,17 @@ ...@@ -66,14 +72,17 @@
class driver, since the lock may also be needed by the clock class driver, since the lock may also be needed by the clock
driver's interrupt service routine. driver's interrupt service routine.
** Supported hardware Supported hardware
==================
* Freescale eTSEC gianfar
+ Freescale eTSEC gianfar
- 2 Time stamp external triggers, programmable polarity (opt. interrupt) - 2 Time stamp external triggers, programmable polarity (opt. interrupt)
- 2 Alarm registers (optional interrupt) - 2 Alarm registers (optional interrupt)
- 3 Periodic signals (optional interrupt) - 3 Periodic signals (optional interrupt)
+ National DP83640 * National DP83640
- 6 GPIOs programmable as inputs or outputs - 6 GPIOs programmable as inputs or outputs
- 6 GPIOs with dedicated functions (LED/JTAG/clock) can also be - 6 GPIOs with dedicated functions (LED/JTAG/clock) can also be
used as general inputs or outputs used as general inputs or outputs
...@@ -81,6 +90,7 @@ ...@@ -81,6 +90,7 @@
- GPIO outputs can produce periodic signals - GPIO outputs can produce periodic signals
- 1 interrupt pin - 1 interrupt pin
+ Intel IXP465 * Intel IXP465
- Auxiliary Slave/Master Mode Snapshot (optional interrupt) - Auxiliary Slave/Master Mode Snapshot (optional interrupt)
- Target Time (optional interrupt) - Target Time (optional interrupt)
...@@ -368,7 +368,7 @@ ts[1] used to hold hardware timestamps converted to system time. ...@@ -368,7 +368,7 @@ ts[1] used to hold hardware timestamps converted to system time.
Instead, expose the hardware clock device on the NIC directly as Instead, expose the hardware clock device on the NIC directly as
a HW PTP clock source, to allow time conversion in userspace and a HW PTP clock source, to allow time conversion in userspace and
optionally synchronize system time with a userspace PTP stack such optionally synchronize system time with a userspace PTP stack such
as linuxptp. For the PTP clock API, see Documentation/ptp/ptp.txt. as linuxptp. For the PTP clock API, see Documentation/driver-api/ptp.rst.
Note that if the SO_TIMESTAMP or SO_TIMESTAMPNS option is enabled Note that if the SO_TIMESTAMP or SO_TIMESTAMPNS option is enabled
together with SO_TIMESTAMPING using SOF_TIMESTAMPING_SOFTWARE, a false together with SO_TIMESTAMPING using SOF_TIMESTAMPING_SOFTWARE, a false
......
...@@ -12765,7 +12765,7 @@ L: netdev@vger.kernel.org ...@@ -12765,7 +12765,7 @@ L: netdev@vger.kernel.org
S: Maintained S: Maintained
W: http://linuxptp.sourceforge.net/ W: http://linuxptp.sourceforge.net/
F: Documentation/ABI/testing/sysfs-ptp F: Documentation/ABI/testing/sysfs-ptp
F: Documentation/ptp/* F: Documentation/driver-api/ptp.rst
F: drivers/net/phy/dp83640* F: drivers/net/phy/dp83640*
F: drivers/ptp/* F: drivers/ptp/*
F: include/linux/ptp_cl* F: include/linux/ptp_cl*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment