From 4bb1667255a86360721291fe59991d033bbc2f2a Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 22 May 2013 10:56:24 +0200 Subject: build some drivers only when compile-testing Some drivers can be built on more platforms than they run on. This is a burden for users and distributors who package a kernel. They have to manually deselect some (for them useless) drivers when updating their configs via oldconfig. And yet, sometimes it is even impossible to disable the drivers without patching the kernel. Introduce a new config option COMPILE_TEST and make all those drivers to depend on the platform they run on, or on the COMPILE_TEST option. Now, when users/distributors choose COMPILE_TEST=n they will not have the drivers in their allmodconfig setups, but developers still can compile-test them with COMPILE_TEST=y. Now the drivers where we use this new option: * PTP_1588_CLOCK_PCH: The PCH EG20T is only compatible with Intel Atom processors so it should depend on x86. * FB_GEODE: Geode is 32-bit only so only enable it for X86_32. * USB_CHIPIDEA_IMX: The OF_DEVICE dependency will be met on powerpc systems -- which do not actually support the hardware via that method. * INTEL_MID_PTI: It is specific to the Penwell type of Intel Atom device. [v2] * remove EXPERT dependency [gregkh - remove chipidea portion, as it's incorrect, and also doesn't apply to my driver-core tree] Signed-off-by: Jiri Slaby Cc: Andrew Morton Cc: Linus Torvalds Cc: Jeff Mahoney Cc: Alexander Shishkin Cc: linux-usb@vger.kernel.org Cc: Florian Tobias Schandinat Cc: linux-geode@lists.infradead.org Cc: linux-fbdev@vger.kernel.org Cc: Richard Cochran Cc: netdev@vger.kernel.org Cc: Ben Hutchings Cc: "Keller, Jacob E" Signed-off-by: Greg Kroah-Hartman --- drivers/misc/Kconfig | 2 +- drivers/ptp/Kconfig | 1 + drivers/video/geode/Kconfig | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index c002d8660e30..e23df6cf710d 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -135,7 +135,7 @@ config PHANTOM config INTEL_MID_PTI tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" - depends on PCI && TTY + depends on PCI && TTY && (X86_INTEL_MID || COMPILE_TEST) default n help The PTI (Parallel Trace Interface) driver directs diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig index 1ea6f1dbbedd..5be73ba0519a 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig @@ -72,6 +72,7 @@ config DP83640_PHY config PTP_1588_CLOCK_PCH tristate "Intel PCH EG20T as PTP clock" + depends on X86 || COMPILE_TEST select PTP_1588_CLOCK help This driver adds support for using the PCH EG20T as a PTP diff --git a/drivers/video/geode/Kconfig b/drivers/video/geode/Kconfig index 21e351a14593..1e8555284786 100644 --- a/drivers/video/geode/Kconfig +++ b/drivers/video/geode/Kconfig @@ -3,7 +3,7 @@ # config FB_GEODE bool "AMD Geode family framebuffer support" - depends on FB && PCI && X86 + depends on FB && PCI && (X86_32 || (X86 && COMPILE_TEST)) ---help--- Say 'Y' here to allow you to select framebuffer drivers for the AMD Geode family of processors. -- cgit v1.2.1