diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-05-22 04:56:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 19:41:32 -0400 |
commit | 4bb1667255a86360721291fe59991d033bbc2f2a (patch) | |
tree | cc6e697ab35538995625e6ba9a5b809c5dd35719 | |
parent | b5aef682e00c424bb2f55639168083b61803a012 (diff) |
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 <jslaby@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-geode@lists.infradead.org
Cc: linux-fbdev@vger.kernel.org
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: "Keller, Jacob E" <jacob.e.keller@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/Kconfig | 2 | ||||
-rw-r--r-- | drivers/ptp/Kconfig | 1 | ||||
-rw-r--r-- | drivers/video/geode/Kconfig | 2 | ||||
-rw-r--r-- | init/Kconfig | 14 |
4 files changed, 17 insertions, 2 deletions
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 | |||
135 | 135 | ||
136 | config INTEL_MID_PTI | 136 | config INTEL_MID_PTI |
137 | tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" | 137 | tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" |
138 | depends on PCI && TTY | 138 | depends on PCI && TTY && (X86_INTEL_MID || COMPILE_TEST) |
139 | default n | 139 | default n |
140 | help | 140 | help |
141 | The PTI (Parallel Trace Interface) driver directs | 141 | 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 | |||
72 | 72 | ||
73 | config PTP_1588_CLOCK_PCH | 73 | config PTP_1588_CLOCK_PCH |
74 | tristate "Intel PCH EG20T as PTP clock" | 74 | tristate "Intel PCH EG20T as PTP clock" |
75 | depends on X86 || COMPILE_TEST | ||
75 | select PTP_1588_CLOCK | 76 | select PTP_1588_CLOCK |
76 | help | 77 | help |
77 | This driver adds support for using the PCH EG20T as a PTP | 78 | 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 @@ | |||
3 | # | 3 | # |
4 | config FB_GEODE | 4 | config FB_GEODE |
5 | bool "AMD Geode family framebuffer support" | 5 | bool "AMD Geode family framebuffer support" |
6 | depends on FB && PCI && X86 | 6 | depends on FB && PCI && (X86_32 || (X86 && COMPILE_TEST)) |
7 | ---help--- | 7 | ---help--- |
8 | Say 'Y' here to allow you to select framebuffer drivers for | 8 | Say 'Y' here to allow you to select framebuffer drivers for |
9 | the AMD Geode family of processors. | 9 | the AMD Geode family of processors. |
diff --git a/init/Kconfig b/init/Kconfig index 55ccdf6640ff..1e825c299ea5 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -53,6 +53,20 @@ config CROSS_COMPILE | |||
53 | need to set this unless you want the configured kernel build | 53 | need to set this unless you want the configured kernel build |
54 | directory to select the cross-compiler automatically. | 54 | directory to select the cross-compiler automatically. |
55 | 55 | ||
56 | config COMPILE_TEST | ||
57 | bool "Compile also drivers which will not load" | ||
58 | default n | ||
59 | help | ||
60 | Some drivers can be compiled on a different platform than they are | ||
61 | intended to be run on. Despite they cannot be loaded there (or even | ||
62 | when they load they cannot be used due to missing HW support), | ||
63 | developers still, opposing to distributors, might want to build such | ||
64 | drivers to compile-test them. | ||
65 | |||
66 | If you are a developer and want to build everything available, say Y | ||
67 | here. If you are a user/distributor, say N here to exclude useless | ||
68 | drivers to be distributed. | ||
69 | |||
56 | config LOCALVERSION | 70 | config LOCALVERSION |
57 | string "Local version - append to kernel release" | 71 | string "Local version - append to kernel release" |
58 | help | 72 | help |