summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu.c
diff options
context:
space:
mode:
authorDavid Schalig <dschalig@nvidia.com>2011-07-20 19:10:39 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-08-01 18:43:47 -0700
commitc3cbd12dc6531054b820a6784fc4d97615df849c (patch)
tree9436fa3b984ac575f381c5d251a2ffd4d5466dd2 /arch/arm/mach-tegra/board-cardhu.c
parent0743587f8d6ce188f43b74548c490680c4733e7d (diff)
ARM: tegra: register USB accessory driver
bug 846277 Change-Id: I1832e3ff0a09c82e44af7ecd7c025ea87fca4ba3 Reviewed-on: http://git-master/r/43180 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu.c')
-rw-r--r--arch/arm/mach-tegra/board-cardhu.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c
index 6c2e29bad4aa..6bc52d7b1a85 100644
--- a/arch/arm/mach-tegra/board-cardhu.c
+++ b/arch/arm/mach-tegra/board-cardhu.c
@@ -34,6 +34,7 @@
#include <linux/input.h>
#include <linux/platform_data/tegra_usb.h>
#include <linux/usb/android_composite.h>
+#include <linux/usb/f_accessory.h>
#include <linux/spi/spi.h>
#include <linux/tegra_uart.h>
#include <linux/memblock.h>
@@ -216,11 +217,18 @@ static __initdata struct tegra_clk_init_table cardhu_clk_init_table[] = {
static char *usb_functions_mtp_ums[] = { "mtp", "usb_mass_storage" };
static char *usb_functions_mtp_adb_ums[] = { "mtp", "adb", "usb_mass_storage" };
+#ifdef CONFIG_USB_ANDROID_ACCESSORY
+static char *usb_functions_accessory[] = { "accessory" };
+static char *usb_functions_accessory_adb[] = { "accessory", "adb" };
+#endif
#ifdef CONFIG_USB_ANDROID_RNDIS
static char *usb_functions_rndis[] = { "rndis" };
static char *usb_functions_rndis_adb[] = { "rndis", "adb" };
#endif
static char *usb_functions_all[] = {
+#ifdef CONFIG_USB_ANDROID_ACCESSORY
+ "accessory",
+#endif
#ifdef CONFIG_USB_ANDROID_RNDIS
"rndis",
#endif
@@ -240,6 +248,20 @@ static struct android_usb_product usb_products[] = {
.num_functions = ARRAY_SIZE(usb_functions_mtp_adb_ums),
.functions = usb_functions_mtp_adb_ums,
},
+#ifdef CONFIG_USB_ANDROID_ACCESSORY
+ {
+ .vendor_id = USB_ACCESSORY_VENDOR_ID,
+ .product_id = USB_ACCESSORY_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_accessory),
+ .functions = usb_functions_accessory,
+ },
+ {
+ .vendor_id = USB_ACCESSORY_VENDOR_ID,
+ .product_id = USB_ACCESSORY_ADB_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_accessory_adb),
+ .functions = usb_functions_accessory_adb,
+ },
+#endif
#ifdef CONFIG_USB_ANDROID_RNDIS
{
.product_id = USB_PRODUCT_ID_RNDIS,