Re: [RFC/PATCH] usb: core: do not build otg if not transceiver is in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 06, 2009 at 02:51:43PM +0200, Balbi Felipe (Nokia-D/Helsinki) wrote:
> true... sorry for that.. missed it.

attached is updated version.

-- 
balbi
>From cbda048d49ff7d3f05886942dc2ed97037695fd9 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@xxxxxxxxx>
Date: Mon, 6 Jul 2009 12:35:56 +0300
Subject: [PATCH] usb: core: do not build otg if not transceiver is in

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..4a4ddb5 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(CONFIG_USB_OTG) && !defined(CONFIG_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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux