summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/gadget_chips.h
diff options
context:
space:
mode:
authorSeth Levy <seth.levy@plxtech.com>2011-06-06 19:42:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-06 16:47:27 -0700
commitceb80363b2ec1091dffd78064771e3d4679f69c7 (patch)
treef92e0be99ebbb9dbcfc479097a6e3ba09ba47a4f /drivers/usb/gadget/gadget_chips.h
parentc4fc2342cb611f945fa468e742759e25984005ad (diff)
USB: net2272: driver for PLX NET2272 USB device controller
This is based on the last release from PLX: http://www.plxtech.com/files/products/net2000/software/selectiontool/RE061204-net2272-linux2.6.18.tgz I've managed to contact them and they've confirmed that this driver was wholly written by PLX (Seth Levy). While they have no problem with it being merged (and they've already licensed it as GPL), they don't have any interest in doing so themselves as this is an old part for them. ADI has long had an add-on card which has this part on it, so we've been keeping it up-to-date out of tree. But now that PLX has confirmed the source of the driver, we can can take the next step of cleaning it up and getting it merged. So here we are! I've done quite a large clean up of the driver and attempted to address all the common issues. Hopefully in the process, I haven't broken anything. While it seems to still work with the board that I have access to, it is not a PCI variant. So I have not tested any of the PCI logic myself (beyond clean compile). Perhaps someone who actually has a card and cares can do so. I'll try to address further feedback, but don't expect miracles. I'm not really familiar with the part itself, just the platform glue. Signed-off-by: Seth Levy <seth.levy@plxtech.com> Signed-off-by: Ash Aziz <ash.aziz@plxtech.com> Signed-off-by: Roy Huang <roy.huang@analog.com> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/gadget_chips.h')
-rw-r--r--drivers/usb/gadget/gadget_chips.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index bcdac7c73e89..13c2f9e94405 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -15,6 +15,12 @@
#ifndef __GADGET_CHIPS_H
#define __GADGET_CHIPS_H
+#ifdef CONFIG_USB_GADGET_NET2272
+#define gadget_is_net2272(g) !strcmp("net2272", (g)->name)
+#else
+#define gadget_is_net2272(g) 0
+#endif
+
#ifdef CONFIG_USB_GADGET_NET2280
#define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
#else
@@ -223,6 +229,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x29;
else if (gadget_is_s3c_hsudc(gadget))
return 0x30;
+ else if (gadget_is_net2272(gadget))
+ return 0x31;
return -ENOENT;
}