summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/gadget_chips.h
diff options
context:
space:
mode:
authorYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>2009-08-19 08:59:39 +0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-20 05:25:30 +0400
commitc41442474a26984abaa094e96e42182868eab658 (patch)
tree729f53db686fe5539f07e9aec623936e686f8ab9 /drivers/usb/gadget/gadget_chips.h
parent24d76195d124986b7702821b8b6cc85942b13146 (diff)
downloadlinux-c41442474a26984abaa094e96e42182868eab658.tar.xz
usb: gadget: R8A66597 peripheral controller support.
While in-tree support for the R8A66597 host side has been supported for some time, the peripheral side has so far been unsupported. This adds a new USB gadget driver which bridges the gap and finally wires up the peripheral side as well. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Tested-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 8e0e9a0b7364..f2d270b202f2 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -173,6 +173,12 @@
// CONFIG_USB_GADGET_AU1X00
// ...
+#ifdef CONFIG_USB_GADGET_R8A66597
+#define gadget_is_r8a66597(g) !strcmp("r8a66597_udc", (g)->name)
+#else
+#define gadget_is_r8a66597(g) 0
+#endif
+
/**
* usb_gadget_controller_number - support bcdDevice id convention
@@ -239,6 +245,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x23;
else if (gadget_is_langwell(gadget))
return 0x24;
+ else if (gadget_is_r8a66597(gadget))
+ return 0x25;
return -ENOENT;
}