示例#1
0
static void htc_8974_add_usb_devices(void)
{
	char *mid = board_mid();
	android_usb_pdata.serial_number = board_serialno();

	if (board_mfg_mode() == 0) {
		android_usb_pdata.nluns = 1;
		android_usb_pdata.cdrom_lun = 0x1;
	}
#ifdef CONFIG_MACH_M8
	android_usb_pdata.product_id	= 0x061A;
#elif defined(CONFIG_MACH_M8_WL)
	android_usb_pdata.product_id	= 0x0616;
	android_usb_pdata.vzw_unmount_cdrom = 1;
#elif defined(CONFIG_MACH_M8_UHL)
	android_usb_pdata.product_id	= 0x063A;
#elif defined(CONFIG_MACH_M8_DUG)
	android_usb_pdata.product_id	= 0x063B;
#elif defined(CONFIG_MACH_EYE_UL)
	android_usb_pdata.product_id	= 0x064C;
#elif defined(CONFIG_MACH_MEC_TL)
	android_usb_pdata.product_id	= 0x0635;
#elif defined(CONFIG_MACH_MEC_UL)
	android_usb_pdata.product_id	= 0x0638;
#elif defined(CONFIG_MACH_MEC_DUG)
	android_usb_pdata.product_id	= 0x0636;
#elif defined(CONFIG_MACH_MEC_DWG)
	android_usb_pdata.product_id	= 0x0644;
#elif defined(CONFIG_MACH_MEC_WHL)
	android_usb_pdata.product_id	= 0x0646;
#endif

	if (strcmp("0PFH20000", mid)==0)
		android_usb_pdata.product_id	= 0x064B;
	else if (strcmp("0P6B90000", mid)==0 || strcmp("0P6B91000", mid)==0)
		android_usb_pdata.product_id	= 0x064A;

	platform_device_register(&android_usb_device);
}
static void htc_8974_add_usb_devices(void)
{
	char *mid;
	android_usb_pdata.serial_number = board_serialno();

	mid = board_mid();

	if (board_mfg_mode() == 0) {
#ifdef CONFIG_MACH_M8_WHL
		android_usb_pdata.nluns = 2;
		android_usb_pdata.cdrom_lun = 0x2;
#elif defined(CONFIG_MACH_B2_WLJ)
		android_usb_pdata.nluns = 2;
		android_usb_pdata.cdrom_lun = 0x2;
#elif defined(CONFIG_MACH_MEC_WHL)
		android_usb_pdata.nluns = 2;
		android_usb_pdata.cdrom_lun = 0x2;
#else
		android_usb_pdata.nluns = 1;
		android_usb_pdata.cdrom_lun = 0x1;
#endif

	}
#ifdef CONFIG_MACH_M8
	android_usb_pdata.product_id	= 0x061A;
#elif defined(CONFIG_MACH_M8_WL)
	android_usb_pdata.product_id	= 0x0616;
	android_usb_pdata.vzw_unmount_cdrom = 1;
#elif defined(CONFIG_MACH_M8_WHL)
	android_usb_pdata.product_id	= 0x061A;
#elif defined(CONFIG_MACH_M8_TL)
	android_usb_pdata.product_id	= 0x0623;
#elif defined(CONFIG_MACH_M8_DUG)
	android_usb_pdata.product_id	= 0x063B;/* M8_DUGL */
#elif defined(CONFIG_MACH_M8_DWG)
	android_usb_pdata.product_id	= 0x0643;/* M8_DWGL */
#elif defined(CONFIG_MACH_M8_UHL)
	android_usb_pdata.product_id	= 0x063A;
#elif defined(CONFIG_MACH_MEC_TL)
	android_usb_pdata.product_id	= 0x0635;
#elif defined(CONFIG_MACH_MEC_UL)
	android_usb_pdata.product_id	= 0x0638;
#elif defined(CONFIG_MACH_MEC_DUG)
	android_usb_pdata.product_id	= 0x0636;/* MEC_DUGL */
#elif defined(CONFIG_MACH_B2_WLJ)
	android_usb_pdata.product_id	= 0x0634;
#elif defined(CONFIG_MACH_B2_UHL)
	android_usb_pdata.product_id	= 0x0642;
#elif defined(CONFIG_MACH_B2_UL)
	android_usb_pdata.product_id	= 0x0642;/* use B2_UHL first */
#elif defined(CONFIG_MACH_MEC_DWG)
	android_usb_pdata.product_id	= 0x0644;/* MEC_DWGL */
#elif defined(CONFIG_MACH_MEC_WHL)
	android_usb_pdata.product_id	= 0x0646;
#elif defined(CONFIG_MACH_MELS_TUHL)
	android_usb_pdata.product_id	= 0x0651;
#elif defined(CONFIG_MACH_EYE_UL)
	android_usb_pdata.product_id	= 0x064C;/* EYE_UL_ATT */
#else
	/* DUG, WHL */
#endif

	if (strcmp("0PFH20000", mid)==0)
		android_usb_pdata.product_id	= 0x064B;/* EYE_TUHL */
	else if (strcmp("0P6B90000", mid)==0 || strcmp("0P6B91000", mid)==0)
		android_usb_pdata.product_id	= 0x064A;/* M8LS_UHL */

	platform_device_register(&android_usb_device);
}
示例#3
0
static void htc_8974_add_usb_devices(void)
{
	char *mid;
	android_usb_pdata.serial_number = board_serialno();

	mid = board_mid();

	if (board_mfg_mode() == 0) {
#ifdef CONFIG_MACH_DUMMY
		android_usb_pdata.nluns = 2;
		android_usb_pdata.cdrom_lun = 0x2;
#elif defined(CONFIG_MACH_DUMMY)
		android_usb_pdata.nluns = 2;
		android_usb_pdata.cdrom_lun = 0x2;
#elif defined(CONFIG_MACH_DUMMY)
		android_usb_pdata.nluns = 2;
		android_usb_pdata.cdrom_lun = 0x2;
#else
		android_usb_pdata.nluns = 1;
		android_usb_pdata.cdrom_lun = 0x1;
#endif

	}
#ifdef CONFIG_MACH_M8
	android_usb_pdata.product_id	= 0x061A;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0616;
	android_usb_pdata.vzw_unmount_cdrom = 1;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x061A;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0623;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x063B;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0643;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0635;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0638;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0636;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0634;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0642;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0644;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0646;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x0651;
#elif defined(CONFIG_MACH_DUMMY)
	android_usb_pdata.product_id	= 0x064C;
#else
	
#endif

	if (strcmp("0PFH20000", mid)==0)
		android_usb_pdata.product_id	= 0x064B;
	else if (strcmp("0P6B90000", mid)==0 || strcmp("0P6B91000", mid)==0)
		android_usb_pdata.product_id	= 0x064A;

	platform_device_register(&android_usb_device);
}