From bd27e2a76eee125cf406c43878ea4f47e9ed13c0 Mon Sep 17 00:00:00 2001 From: tytung Date: Wed, 16 Nov 2011 00:32:35 +0800 Subject: [PATCH] msm: htcleo: Add platform data for USB accessory function. --- arch/arm/mach-msm/include/mach/htc_usb.h | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/mach-msm/include/mach/htc_usb.h b/arch/arm/mach-msm/include/mach/htc_usb.h index 21029f58..baac489d 100644 --- a/arch/arm/mach-msm/include/mach/htc_usb.h +++ b/arch/arm/mach-msm/include/mach/htc_usb.h @@ -16,6 +16,7 @@ #ifdef CONFIG_USB_ANDROID #include +#include #ifdef CONFIG_ARCH_QSD8X50 void msm_hsusb_8x50_phy_reset(void); @@ -40,6 +41,16 @@ static char *usb_functions_rndis_adb[] = { }; #endif +#ifdef CONFIG_USB_ANDROID_ACCESSORY +static char *usb_functions_accessory[] = { + "accessory" +}; +static char *usb_functions_accessory_adb[] = { + "accessory", + "adb" +}; +#endif + #ifdef CONFIG_USB_ANDROID_PROJECTOR static char *usb_functions_projector[] = { "usb_mass_storage", @@ -116,6 +127,9 @@ static char *usb_functions_all[] = { #ifdef CONFIG_USB_ANDROID_RNDIS "rndis", #endif +#ifdef CONFIG_USB_ANDROID_ACCESSORY + "accessory", +#endif #ifdef CONFIG_USB_ANDROID_MTP "mtp", #endif @@ -225,6 +239,20 @@ static struct android_usb_product usb_products[] = { .functions = usb_functions_rndis_adb, }, #endif +#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 }; #endif