diff options
Diffstat (limited to 'drivers/ptp')
-rw-r--r-- | drivers/ptp/Kconfig | 15 | ||||
-rw-r--r-- | drivers/ptp/ptp_vclock.c | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig index 8b08745e1ca1..e82b4a678acb 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig @@ -8,6 +8,7 @@ menu "PTP clock support" config PTP_1588_CLOCK tristate "PTP clock support" depends on NET && POSIX_TIMERS + default ETHERNET select PPS select NET_PTP_CLASSIFY help @@ -26,6 +27,18 @@ config PTP_1588_CLOCK To compile this driver as a module, choose M here: the module will be called ptp. +config PTP_1588_CLOCK_OPTIONAL + tristate + default y if PTP_1588_CLOCK=n + default PTP_1588_CLOCK + help + Drivers that can optionally use the PTP_1588_CLOCK framework + should depend on this symbol to prevent them from being built + into vmlinux while the PTP support itself is in a loadable + module. + If PTP support is disabled, this dependency will still be + met, and drivers refer to dummy helpers. + config PTP_1588_CLOCK_DTE tristate "Broadcom DTE as PTP clock" depends on PTP_1588_CLOCK @@ -91,7 +104,7 @@ config PTP_1588_CLOCK_PCH tristate "Intel PCH EG20T as PTP clock" depends on X86_32 || COMPILE_TEST depends on HAS_IOMEM && NET - imply PTP_1588_CLOCK + depends on PTP_1588_CLOCK help This driver adds support for using the PCH EG20T as a PTP clock. The hardware supports time stamping of PTP packets diff --git a/drivers/ptp/ptp_vclock.c b/drivers/ptp/ptp_vclock.c index e0f87c57749a..baee0379482b 100644 --- a/drivers/ptp/ptp_vclock.c +++ b/drivers/ptp/ptp_vclock.c @@ -149,6 +149,7 @@ void ptp_vclock_unregister(struct ptp_vclock *vclock) kfree(vclock); } +#if IS_BUILTIN(CONFIG_PTP_1588_CLOCK) int ptp_get_vclocks_index(int pclock_index, int **vclock_index) { char name[PTP_CLOCK_NAME_LEN] = ""; @@ -217,3 +218,4 @@ void ptp_convert_timestamp(struct skb_shared_hwtstamps *hwtstamps, hwtstamps->hwtstamp = ns_to_ktime(ns); } EXPORT_SYMBOL(ptp_convert_timestamp); +#endif |