Thanks Squall.
Could you tell me what is the significance of specifying particular USB
function in first order like
static char *usb_functions[] = {
#ifdef CONFIG_USB_ANDROID_RMNET
"rmnet",
#endif
#ifdef CONFIG_USB_ANDROID_RNDIS
"rndis",
#endif
"usb_mass_storage",
"adb",
//#ifdef CONFIG_USB_ANDROID_RMNET
// "rmnet",
//#endif
#ifdef CONFIG_USB_ANDROID_ACM
"acm",
#endif
};
In above code i putting rmnet to first, what is the significance?
Thanks,
Jagan
On Thu, Apr 14, 2011 at 7:13 AM, Squall.Hung <[email protected]> wrote:
> Hi Jagan,
>
> No, you need to assign correct values into bMasterInterface0 and
> bSlaveInterface0 instead of values generated dynamically.
> There is an easy way can avoid this problem and lets you continuing
> your work. You can try to re-range items in array, "usb_functions"
> like sample make acm to be first one in array. Hope this information
> can help you.
>
> Sample code:
>
> static char *usb_functions[] = {
> #ifdef CONFIG_USB_ANDROID_ACM
> "acm",
> #endif
> #ifdef CONFIG_USB_ANDROID_RNDIS
> "rndis",
> #endif
> "usb_mass_storage",
> "adb",
> #ifdef CONFIG_USB_ANDROID_RMNET
> "rmnet",
> #endif
> // move this item to first one in the array
> //#ifdef CONFIG_USB_ANDROID_ACM
> // "acm",
> //#endif
> };
>
> static struct android_usb_platform_data android_usb_pdata = {
> .vendor_id = 0x1234,
> .product_id = 0x1234,
> .version = 0x1234,
> .product_name = "Android HSUSB Device",
> .manufacturer_name = "XXX",
> .num_products = ARRAY_SIZE(usb_products),
> .products = usb_products,
> .num_functions = ARRAY_SIZE(usb_functions),
> .functions = usb_functions,
> .serial_number = "1234567890ABCDEF",
>
> };
>
> static struct platform_device android_usb_device = {
> .name = "android_usb",
> .id = -1,
> .dev = {
> .platform_data = &android_usb_pdata,
> },
> };
>
>
> br,
> Chihchia
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-kernel
>
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel