static void ft5x0x_power_off(struct touch_pdata *pdata) { if (pdata->gpio_reset) { set_reset_pin(pdata, 0); msleep(5); } if (pdata->gpio_power) { set_power_pin(pdata, 0); } }
int switch_boot_mode(void) { unsigned long hold_time = 50000, polling_time = 10000, tmp; printf("ENTER U-BOOT SWITCH MODE !!!!\n"); saradc_enable(); //added by pengtj for added fool idle get_key(); get_key(); #ifdef ADD_FOR_MBX_C03 set_power_pin(); #endif while(hold_time > 0) { udelay(polling_time); tmp = get_key(); printf("get_key(): %d\n", tmp); if(!tmp) break; hold_time -= polling_time; } logo_display(); if (reboot_mode == AMLOGIC_FACTORY_RESET_REBOOT ) { printf("Recovery Start from upgrade apk...\n"); #ifdef CONFIG_UPGRADE into_recovery(); #else run_command ("run recoveryboot", 0); #endif hang(); } else if(hold_time > 0) { printf("Normal Start...\n"); #ifdef POWER_KEY_LEAD_START_UP int temp=0; int bootdelay=0; printf("Please input power key ! \n "); gpio_direction_input(INPUT_KEY_VALUE); printf("\b\b\b\0"); while(1) { temp=gpio_get_value(INPUT_KEY_VALUE); if(temp<1) break; udelay(10000); }; #endif return 1; } else { printf("Recovery Start...\n"); //aml_autoscript(); #ifdef CONFIG_UPGRADE into_recovery(); #else run_command ("run recoveryboot", 0); #endif hang(); } }