Message ID | 20201117213826.18235-1-a.fatoum@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,v1] ptp: document struct ptp_clock_request members | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 551 this patch: 551 |
netdev/kdoc | success | Errors and warnings before: 5 this patch: 5 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 19 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 604 this patch: 604 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Tue, Nov 17, 2020 at 10:38:26PM +0100, Ahmad Fatoum wrote: > It's arguable most people interested in configuring a PPS signal > want it as external output, not as kernel input. PTP_CLK_REQ_PPS > is for input though. Add documentation to nudge readers into > the correct direction. > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Thanks! Acked-by: Richard Cochran <richardcochran@gmail.com>
On Wed, 18 Nov 2020 05:05:41 -0800 Richard Cochran wrote: > On Tue, Nov 17, 2020 at 10:38:26PM +0100, Ahmad Fatoum wrote: > > It's arguable most people interested in configuring a PPS signal > > want it as external output, not as kernel input. PTP_CLK_REQ_PPS > > is for input though. Add documentation to nudge readers into > > the correct direction. > > > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > > Acked-by: Richard Cochran <richardcochran@gmail.com> Applied, thanks!
On 11/17/2020 1:38 PM, Ahmad Fatoum wrote: > It's arguable most people interested in configuring a PPS signal > want it as external output, not as kernel input. PTP_CLK_REQ_PPS > is for input though. Add documentation to nudge readers into > the correct direction. Agreed. I think at least one driver has abused the PPS in the past as a way to request that we enable the PPS hardware, resulting in effectively using it as a limited form of the EXTTS interface. Hopefully this helps reduce the confusion here! Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- > Prompted by Richard's comment here: > https://lore.kernel.org/netdev/20180525170247.r4gn323udrucmyv6@localhost/ > --- > include/linux/ptp_clock_kernel.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h > index d3e8ba5c7125..0d47fd33b228 100644 > --- a/include/linux/ptp_clock_kernel.h > +++ b/include/linux/ptp_clock_kernel.h > @@ -12,6 +12,19 @@ > #include <linux/pps_kernel.h> > #include <linux/ptp_clock.h> > > +/** > + * struct ptp_clock_request - request PTP clock event > + * > + * @type: The type of the request. > + * EXTTS: Configure external trigger timestamping > + * PEROUT: Configure periodic output signal (e.g. PPS) > + * PPS: trigger internal PPS event for input > + * into kernel PPS subsystem > + * @extts: describes configuration for external trigger timestamping. > + * This is only valid when event == PTP_CLK_REQ_EXTTS. > + * @perout: describes configuration for periodic output. > + * This is only valid when event == PTP_CLK_REQ_PEROUT. > + */ > > struct ptp_clock_request { > enum { >
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index d3e8ba5c7125..0d47fd33b228 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -12,6 +12,19 @@ #include <linux/pps_kernel.h> #include <linux/ptp_clock.h> +/** + * struct ptp_clock_request - request PTP clock event + * + * @type: The type of the request. + * EXTTS: Configure external trigger timestamping + * PEROUT: Configure periodic output signal (e.g. PPS) + * PPS: trigger internal PPS event for input + * into kernel PPS subsystem + * @extts: describes configuration for external trigger timestamping. + * This is only valid when event == PTP_CLK_REQ_EXTTS. + * @perout: describes configuration for periodic output. + * This is only valid when event == PTP_CLK_REQ_PEROUT. + */ struct ptp_clock_request { enum {
It's arguable most people interested in configuring a PPS signal want it as external output, not as kernel input. PTP_CLK_REQ_PPS is for input though. Add documentation to nudge readers into the correct direction. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- Prompted by Richard's comment here: https://lore.kernel.org/netdev/20180525170247.r4gn323udrucmyv6@localhost/ --- include/linux/ptp_clock_kernel.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)