daniel-p-carvalho opened a new pull request, #20208: URL: https://github.com/apache/nuttx/pull/20208
## Summary The PTP clock driver page (`Documentation/components/drivers/special/ptp.rst`) explains how to write a lower-half driver, but it does not say which ones exist in the tree, and the driver of a real Ethernet MAC was added in #20180. This PR adds an "Existing Implementations" section, in the way that other driver pages do (for example the RPTUN driver porting page). It changes documentation only. The section lists the two lower-half drivers that call `ptp_clock_register()` in `master`: - `drivers/timers/ptp_clock_dummy.c`, the dummy driver described in the same page, enabled with `CONFIG_PTP_CLOCK_DUMMY` and registered as `/dev/ptp0` at start-up. - `arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c`, the Ethernet MAC of the STM32 (the legacy driver), enabled with `CONFIG_PTP_CLOCK` and `CONFIG_STM32_ETH_PTP` and registered as `/dev/ptpN`, where N is the number of the Ethernet interface. It says that the clock is the PTP counter of the MAC, which is also the time base of the hardware timestamps of the received packets, so those are not values of `CLOCK_REALTIME`. It also says that both use the device number 0 by default, so they cannot be registered at the same time. That comes from the code: the dummy driver is initialized with device number 0 in `drivers_initialize()` and the STM32 driver registers with the number of the interface. ## Impact Documentation only, no code change. Only the page `components/drivers/special/ptp` changes. ## Testing Built the documentation with Sphinx 6.2.1 and the packages of `Documentation/Pipfile`, without `-W`: the build succeeds, the new section renders and none of the 19 warnings (duplicate C declarations in other pages) is from this file. `./tools/checkpatch.sh` passes. The statements were checked by reading the code: the only two drivers that register a PTP clock were found with a search for `ptp_clock_register()` and `ptp_clock_dummy_initialize()` in `master`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
