goldfish: refactor goldfish platform configs
authorGreg Hackmann <ghackmann@google.com>
Wed, 6 Jan 2016 14:04:13 +0000 (14:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2016 07:34:36 +0000 (23:34 -0800)
On new virtual devices, the goldfish virtual bus can be replaced with
autoprobing infrastructure like Device Tree.  Refactor the goldfish
kernel configs to better accommodate this.

Move the goldfish platform into a menuconfig in the style of the chrome
platform, and separate the goldfish bus into its own config option.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Jin Qian <jinqian@android.com>
[Corrected a tristate to bool]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/Kconfig
drivers/platform/goldfish/Kconfig
drivers/platform/goldfish/Makefile

index 0adccbf5c83f116bd698c392c47b75a9197f892f..c11db8bceea13e49cfd70704def1fb4e62b9313f 100644 (file)
@@ -4,8 +4,7 @@ endif
 if MIPS
 source "drivers/platform/mips/Kconfig"
 endif
-if GOLDFISH
+
 source "drivers/platform/goldfish/Kconfig"
-endif
 
 source "drivers/platform/chrome/Kconfig"
index 635ef25cc722a0c01ee13fd95ddfe78b6bbd6f39..2be762743592d2a353e33450425b31ca0ce397ee 100644 (file)
@@ -1,5 +1,23 @@
+menuconfig GOLDFISH
+       bool "Platform support for Goldfish virtual devices"
+       depends on X86_32 || X86_64 || ARM || ARM64
+       ---help---
+         Say Y here to get to see options for the Goldfish virtual platform.
+         This option alone does not add any kernel code.
+
+         Unless you are building for the Android Goldfish emulator say N here.
+
+if GOLDFISH
+
+config GOLDFISH_BUS
+       bool "Goldfish platform bus"
+       ---help---
+         This is a virtual bus to host Goldfish Android Virtual Devices.
+
 config GOLDFISH_PIPE
        tristate "Goldfish virtual device for QEMU pipes"
        ---help---
          This is a virtual device to drive the QEMU pipe interface used by
          the Goldfish Android Virtual Device.
+
+endif # GOLDFISH
index a0022395eee93f38c6a981cc9145cbe5ae8774f4..d3487125838cdce457c2f7acefdd9052b92cbde1 100644 (file)
@@ -1,5 +1,5 @@
 #
 # Makefile for Goldfish platform specific drivers
 #
-obj-$(CONFIG_GOLDFISH) +=      pdev_bus.o
+obj-$(CONFIG_GOLDFISH_BUS)     += pdev_bus.o
 obj-$(CONFIG_GOLDFISH_PIPE)    += goldfish_pipe.o