static int musb_host_test_mode(unsigned char cmd){ //musb_otg_env_init(); #ifdef MTK_FAN5405_SUPPORT fan5405_set_opa_mode(1); fan5405_set_otg_pl(1); fan5405_set_otg_en(1); #elif defined(MTK_BQ24158_SUPPORT) bq24158_set_opa_mode(1); bq24158_set_otg_pl(1); bq24158_set_otg_en(1); //<2013/3/4-22419-jessicatseng, [Pelican] Some bq24157 related files are not integrated into JB2 #elif defined(MTK_BQ24157_SUPPORT) bq24157_set_opa_mode(1); bq24157_set_otg_pl(1); bq24157_set_otg_en(1); //>2013/3/4-22419-jessicatseng #elif defined(MTK_NCP1851_SUPPORT) || defined(MTK_BQ24196_SUPPORT) tbl_charger_otg_vbus(1); #else #if !(defined(CONFIG_MT6585_FPGA) || defined(CONFIG_MT6577_FPGA) || defined(CONFIG_MT6589_FPGA) || defined(CONFIG_MT6582_FPGA)) mt_set_gpio_mode(GPIO_OTG_DRVVBUS_PIN,6); //mt_set_gpio_out (GPIO_OTG_DRVVBUS_PIN, 1); #endif #endif musb_otg_reset_usb (); host_test_mode(mtk_musb,cmd); return 0; }
static int musb_host_test_mode(unsigned char cmd){ //musb_otg_env_init(); #ifdef MTK_FAN5405_SUPPORT fan5405_set_opa_mode(1); fan5405_set_otg_pl(1); fan5405_set_otg_en(1); #elif defined(MTK_BQ24158_SUPPORT) bq24158_set_opa_mode(1); bq24158_set_otg_pl(1); bq24158_set_otg_en(1); #elif defined(MTK_NCP1851_SUPPORT) || defined(MTK_BQ24196_SUPPORT) tbl_charger_otg_vbus(1); #else #if !(defined(CONFIG_MT6585_FPGA) || defined(CONFIG_MT6577_FPGA) || defined(CONFIG_MT6589_FPGA) || defined(CONFIG_MT6582_FPGA)) #if defined(GPIO_OTG_DRVVBUS_PIN) mt_set_gpio_mode(GPIO_OTG_DRVVBUS_PIN,6); //mt_set_gpio_out (GPIO_OTG_DRVVBUS_PIN, 1); #endif #endif #endif musb_otg_reset_usb (); host_test_mode(mtk_musb,cmd); return 0; }
static int musb_host_test_mode(unsigned char cmd){ musb_platform_set_vbus(mtk_musb, 1); musb_otg_reset_usb (); host_test_mode(mtk_musb,cmd); return 0; }