error out configurations with OTG and no transceivers. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/usb/core/usb.c | 3 +++ drivers/usb/otg/Kconfig | 8 ++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index a26f738..f4a28ff 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -44,6 +44,9 @@ #include "hcd.h" #include "usb.h" +#if defined(USB_OTG) && !defined(USB_OTG_TRANSCEIVER) +#error "Cannot support OTG without a transceiver" +#endif const char *usbcore_name = "usbcore"; diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index 69feeec..95da62b 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig @@ -6,6 +6,9 @@ comment "OTG and related infrastructure" +config USB_OTG_TRANSCEIVER + bool + config USB_OTG_UTILS bool help @@ -21,6 +24,7 @@ config USB_GPIO_VBUS tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" depends on GENERIC_GPIO select USB_OTG_UTILS + select USB_OTG_TRANSCEIVER help Provides simple GPIO VBUS sensing for controllers with an internal transceiver via the otg_transceiver interface, and @@ -31,6 +35,7 @@ config ISP1301_OMAP tristate "Philips ISP1301 with OMAP OTG" depends on I2C && ARCH_OMAP_OTG select USB_OTG_UTILS + select USB_OTG_TRANSCEIVER help If you say yes here you get support for the Philips ISP1301 USB-On-The-Go transceiver working with the OMAP OTG controller. @@ -45,6 +50,7 @@ config TWL4030_USB tristate "TWL4030 USB Transceiver Driver" depends on TWL4030_CORE && REGULATOR_TWL4030 select USB_OTG_UTILS + select USB_OTG_TRANSCEIVER help Enable this to support the USB OTG transceiver on TWL4030 family chips (including the TWL5030 and TPS659x0 devices). @@ -54,6 +60,7 @@ config TWL4030_USB config NOP_USB_XCEIV tristate "NOP USB Transceiver Driver" select USB_OTG_UTILS + select USB_OTG_TRANSCEIVER help this driver is to be used by all the usb transceiver which are either built-in with usb ip or which are autonomous and doesn't require any @@ -64,6 +71,7 @@ config USB_LANGWELL_OTG depends on USB && MRST select USB_OTG select USB_OTG_UTILS + select USB_OTG_TRANSCEIVER help Say Y here if you want to build Intel Langwell USB OTG transciever driver in kernel. This driver implements role -- 1.6.3.2.363.gc5764 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html