Skip to contentSkip to conversation

usb: otg: adding nop usb transceiver

PATCH New Ajay Kumar Gupta 1 participant 1 message Feb 6, 2009 USB

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 usb: otg: adding nop usb transceiver

NOP transceiver is used by all the usb transceiver which are mostly autonomous and doesn't require any programming or which are built into the usb ip itself.NOP transceiver only allocates the memory for struct xceiv and calls otg_set_transceiver() so function call to otg_get_transceiver() will return a valid transceiver.

NOP transceiver device should be registered by calling usb_nop_xceiv_register() from platform files.

---
 drivers/usb/otg/Kconfig         |    8 ++
 drivers/usb/otg/Makefile        |    1 +
 drivers/usb/otg/nop-usb-xceiv.c |  180 +++++++++++++++++++++++++++++++++++++++
 include/linux/usb/otg.h         |    4 +
 4 files changed, 193 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/otg/nop-usb-xceiv.c
drivers/usb/otg/Kconfig +8 -0
index ee55b44..fc1ca03 100644
@@ -51,4 +51,12 @@ config TWL4030_USB
 	  This transceiver supports high and full speed devices plus,
 	  in host mode, low speed.
 
+config NOP_USB_XCEIV
+	tristate "NOP USB Transceiver Driver"
+	select USB_OTG_UTILS
+	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
+	 phy programming such as ISP1x04 etc.
+
 endif # USB || OTG
drivers/usb/otg/Makefile +1 -0
index d73c7cf..2081678 100644
@@ -9,6 +9,7 @@ obj-$(CONFIG_USB_OTG_UTILS)	+= otg.o
 obj-$(CONFIG_USB_GPIO_VBUS)	+= gpio_vbus.o
 obj-$(CONFIG_ISP1301_OMAP)	+= isp1301_omap.o
 obj-$(CONFIG_TWL4030_USB)	+= twl4030-usb.o
+obj-$(CONFIG_NOP_USB_XCEIV)	+= nop-usb-xceiv.o
 
 ccflags-$(CONFIG_USB_DEBUG)	+= -DDEBUG
 ccflags-$(CONFIG_USB_GADGET_DEBUG) += -DDEBUG
drivers/usb/otg/nop-usb-xceiv.c new file +180 -0

180 lines not on this page · raw message

include/linux/usb/otg.h +4 -0
index 94df4fe..54f2424 100644
@@ -80,6 +80,10 @@ struct otg_transceiver {
 
 /* for board-specific init logic */
 extern int otg_set_transceiver(struct otg_transceiver *);
+#ifdef CONFIG_NOP_USB_XCEIV
+extern void usb_nop_xceiv_register(void);
+extern void usb_nop_xceiv_unregister(void);
+#endif
 
 
 /* for usb host and peripheral controller drivers */
Signature · 1 line
1.5.6