]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ptp_clock: Allow for it to be optional
authorNicolas Pitre <nicolas.pitre@linaro.org>
Fri, 11 Nov 2016 05:10:07 +0000 (00:10 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Nov 2016 08:26:34 +0000 (09:26 +0100)
commitd1cbfd771ce8297fa11e89f315392de6056a2181
tree3ad9ec4f2acce6888ab96faaf06cc4e0f5fb7a76
parent32ce5ac867bf4ba8350a751216d087f574a38133
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. Drivers must be
ready to accept NULL from ptp_clock_register() in that case.

And to make it possible for PTP to be configured out, the select statement
in those driver's Kconfig menu entries is converted to the new "imply"
statement. This way the PTP subsystem may have Kconfig dependencies of
its own, such as POSIX_TIMERS, without having to make those ethernet
drivers unavailable if POSIX timers are cconfigured out. And when support
for POSIX timers is selected again then the default config option for PTP
clock support will automatically be adjusted accordingly.

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.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-kbuild@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Michal Marek <mmarek@suse.com>
Link: http://lkml.kernel.org/r/1478841010-28605-4-git-send-email-nicolas.pitre@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
18 files changed:
drivers/Makefile
drivers/net/ethernet/adi/Kconfig
drivers/net/ethernet/amd/Kconfig
drivers/net/ethernet/amd/xgbe/xgbe-main.c
drivers/net/ethernet/broadcom/Kconfig
drivers/net/ethernet/cavium/Kconfig
drivers/net/ethernet/freescale/Kconfig
drivers/net/ethernet/intel/Kconfig
drivers/net/ethernet/mellanox/mlx4/Kconfig
drivers/net/ethernet/mellanox/mlx5/core/Kconfig
drivers/net/ethernet/renesas/Kconfig
drivers/net/ethernet/samsung/Kconfig
drivers/net/ethernet/sfc/Kconfig
drivers/net/ethernet/stmicro/stmmac/Kconfig
drivers/net/ethernet/ti/Kconfig
drivers/net/ethernet/tile/Kconfig
drivers/ptp/Kconfig
include/linux/ptp_clock_kernel.h