Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: greybus: enable compile testing of arche driver

Add Arche platform-driver config option and allow the driver to be
compile tested also without the out-of-tree usb3613 driver.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
2eccd4aa 1e029b83

+18 -1
+10
drivers/staging/greybus/Kconfig
··· 216 216 will be called gb-usb.ko 217 217 218 218 endif # GREYBUS_BRIDGED_PHY 219 + 220 + config GREYBUS_ARCHE 221 + tristate "Greybus Arche Platform driver" 222 + depends on USB_HSIC_USB3613 || COMPILE_TEST 223 + ---help--- 224 + Select this option if you have an Arche device. 225 + 226 + To compile this code as a module, chose M here: the module 227 + will be called gb-arche.ko 228 + 219 229 endif # GREYBUS
+1 -1
drivers/staging/greybus/Makefile
··· 91 91 # Greybus Platform driver 92 92 gb-arche-y := arche-platform.o arche-apb-ctrl.o 93 93 94 - obj-$(CONFIG_USB_HSIC_USB3613) += gb-arche.o 94 + obj-$(CONFIG_GREYBUS_ARCHE) += gb-arche.o
+7
drivers/staging/greybus/arche-platform.c
··· 24 24 #include "arche_platform.h" 25 25 #include "greybus.h" 26 26 27 + #if IS_ENABLED(CONFIG_USB_HSIC_USB3613) 27 28 #include <linux/usb/usb3613.h> 29 + #else 30 + static inline int usb3613_hub_mode_ctrl(bool unused) 31 + { 32 + return 0; 33 + } 34 + #endif 28 35 29 36 #define WD_COLDBOOT_PULSE_WIDTH_MS 30 30 37