Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1485824
| From | Richard Cochran <richardcochran@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3) posix-timers: make it configurable |
| Date | 2016-09-18 16:40 +0200 |
| Message-ID | <siLqa-Pm-7@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <shMeC-3PX-11@gated-at.bofh.it> <shMxX-3WU-9@gated-at.bofh.it> <shMRj-43H-9@gated-at.bofh.it> <shVKW-1xC-15@gated-at.bofh.it> <sie1b-594-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 16, 2016 at 10:57:58PM -0400, Nicolas Pitre wrote: > Subject: [PATCH] ptp_clock: allow for it to be optional > > In order to break the hard dependency between the PTP clock subsystem and > ethernet drivers capable of being clock providers, this patch provides > simple PTP stub functions to allow linkage of those drivers into the > kernel even when the PTP subsystem is configured out. > > And to make it possible for PTP to be configured out, the select statement > in the Kconfig entry for those ethernet drivers is changed from selecting > PTP_1588_CLOCK to PTP_1588_CLOCK_DEFAULT whose purpose is to indicate the > default Kconfig value for the PTP subsystem. > > This way the PTP subsystem may have Kconfig dependencies of its own, such > as POSIX_TIMERS, without making those ethernet drivers unavailable if > POSIX timers are cconfigured out. And when support for POSIX timers is > selected again then PTP clock support will also be selected accordingly. > > Drivers must be ready to accept NULL from ptp_clock_register(). > The pch_gbe driver is a bit special as it relies on extra code in > drivers/ptp/ptp_pch.c. Therefore we let the make process descend into > drivers/ptp/ even if PTP_1588_CLOCK is unselected. Thanks for the detailed description. > diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig > index 00e6098e9a..c36c018f0f 100644 > --- a/drivers/ptp/Kconfig > +++ b/drivers/ptp/Kconfig > @@ -4,8 +4,12 @@ > > menu "PTP clock support" > > +config PTP_1588_CLOCK_DEFAULT > + tristate I see what this option is doing, but I wonder about the name "DEFAULT". In what sense is this a default? > +/** > + * ptp_clock_register() - register a PTP hardware clock driver > + * > + * @info: Structure describing the new clock. > + * @parent: Pointer to the parent device of the new clock. Here we should finally explain the return value for authors of new drivers. Something like this: * Returns a valid pointer on success or PTR_ERR on failure. If PHC * support is missing at the configuration level, this function * returns NULL, and drivers are expected to gracefully handle that * case separately. > + */ > + > +extern struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, > + struct device *parent); Thanks, Richard
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-15 05:50 +0200
Re: [PATCH v3) posix-timers: make it configurable John Stultz <john.stultz@linaro.org> - 2016-09-15 19:50 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-15 20:00 +0200
Re: [PATCH v3) posix-timers: make it configurable John Stultz <john.stultz@linaro.org> - 2016-09-15 20:20 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-15 20:30 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-15 20:40 +0200
Re: [PATCH v3) posix-timers: make it configurable John Stultz <john.stultz@linaro.org> - 2016-09-15 20:50 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-15 21:40 +0200
Re: [PATCH v3) posix-timers: make it configurable John Stultz <john.stultz@linaro.org> - 2016-09-15 22:00 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-15 23:10 +0200
Re: [PATCH v3) posix-timers: make it configurable Josh Triplett <josh@joshtriplett.org> - 2016-09-15 23:20 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-15 23:40 +0200
Re: [PATCH v3) posix-timers: make it configurable Josh Triplett <josh@joshtriplett.org> - 2016-09-16 00:00 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-16 09:30 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-17 05:00 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-18 16:40 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-18 19:00 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-18 20:30 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-18 21:00 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-18 22:30 +0200
Re: [PATCH v3) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-18 22:40 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-18 23:20 +0200
Re: [PATCH v3) posix-timers: make it configurable Richard Cochran <richardcochran@gmail.com> - 2016-09-15 23:30 +0200
Re: [PATCH v3) posix-timers: make it configurable John Stultz <john.stultz@linaro.org> - 2016-09-15 20:40 +0200
Re: [PATCH v3) posix-timers: make it configurable kbuild test robot <lkp@intel.com> - 2016-09-16 16:40 +0200
csiph-web