From 2eccd4aa19fc88e48e4be4d86f271a266d95e6d0 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 16 May 2017 10:01:39 +0200 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/Kconfig | 10 ++++++++++ drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/arche-platform.c | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'drivers/staging/greybus') diff --git a/drivers/staging/greybus/Kconfig b/drivers/staging/greybus/Kconfig index 50de2d72dde0..ab096bcef98c 100644 --- a/drivers/staging/greybus/Kconfig +++ b/drivers/staging/greybus/Kconfig @@ -216,4 +216,14 @@ config GREYBUS_USB will be called gb-usb.ko endif # GREYBUS_BRIDGED_PHY + +config GREYBUS_ARCHE + tristate "Greybus Arche Platform driver" + depends on USB_HSIC_USB3613 || COMPILE_TEST + ---help--- + Select this option if you have an Arche device. + + To compile this code as a module, chose M here: the module + will be called gb-arche.ko + endif # GREYBUS diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile index b26b9a35bdd5..23e1cb7bff8e 100644 --- a/drivers/staging/greybus/Makefile +++ b/drivers/staging/greybus/Makefile @@ -91,4 +91,4 @@ obj-$(CONFIG_GREYBUS_USB) += gb-usb.o # Greybus Platform driver gb-arche-y := arche-platform.o arche-apb-ctrl.o -obj-$(CONFIG_USB_HSIC_USB3613) += gb-arche.o +obj-$(CONFIG_GREYBUS_ARCHE) += gb-arche.o diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 9e644bfe2ae0..5bce5e039596 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -24,7 +24,14 @@ #include "arche_platform.h" #include "greybus.h" +#if IS_ENABLED(CONFIG_USB_HSIC_USB3613) #include +#else +static inline int usb3613_hub_mode_ctrl(bool unused) +{ + return 0; +} +#endif #define WD_COLDBOOT_PULSE_WIDTH_MS 30 -- cgit v1.2.3