static void tpd_down(int x, int y, int id) { if(tpd_status) { TPD_DEBUG("tpd_down!\n"); if(RECOVERY_BOOT != get_boot_mode()) { input_report_key(tpd->dev, BTN_TOUCH, 1); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 128); input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id-1); input_mt_sync(tpd->dev); tpd_down_state=1; down_x=x; down_y=y; } if (FACTORY_BOOT == get_boot_mode()|| RECOVERY_BOOT == get_boot_mode()) { //tpd_button(x, y, 1); int i ; for(i=0;i< TPD_KEY_COUNT;i++) { if( (x >= (tpd_keys_dim_local[i][0] - tpd_keys_dim_local[i][2]/2)) && (x <=(tpd_keys_dim_local[i][0]+tpd_keys_dim_local[i][2]/2)) &&(y >= (tpd_keys_dim_local[i][1]-tpd_keys_dim_local[i][3]/2)) &&(y <=(tpd_keys_dim_local[i][1]+tpd_keys_dim_local[i][3]/2)) ) { TPD_DEBUG("tpd down value ==%d \n",tpd_keys_local[i]); input_report_key(tpd->dev, tpd_keys_local[i], 1); } } } } }
static void tpd_up(int x, int y,int *count) { if(tpd_status){ TPD_DEBUG("tpd_up!\n"); if(RECOVERY_BOOT != get_boot_mode()) { input_report_key(tpd->dev, BTN_TOUCH, 0); input_mt_sync(tpd->dev); tpd_down_state=0; down_x=0; down_y=0; } if (FACTORY_BOOT == get_boot_mode()|| RECOVERY_BOOT == get_boot_mode()) { int i ; for(i=0;i< TPD_KEY_COUNT;i++) { if( (x >= (tpd_keys_dim_local[i][0] - tpd_keys_dim_local[i][2]/2)) && (x <=(tpd_keys_dim_local[i][0]+tpd_keys_dim_local[i][2]/2)) &&(y >= (tpd_keys_dim_local[i][1]-tpd_keys_dim_local[i][3]/2)) &&(y <=(tpd_keys_dim_local[i][1]+tpd_keys_dim_local[i][3]/2)) ) { TPD_DEBUG("tpd up value ==%d \n",tpd_keys_local[i]); input_report_key(tpd->dev, tpd_keys_local[i], 0); } } } } }
static int tpd_up(tinno_ts_data *ts, int x, int y, int pressure, int trackID) { if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { CTP_DBG("x=%03d, y=%03d, ID=%03d", x, y, trackID); input_report_abs(tpd->dev, ABS_PRESSURE, 0); input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); input_report_key(tpd->dev, BTN_TOUCH, 0); input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); #ifdef FTS_SUPPORT_TRACK_ID input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID); #endif input_report_abs(tpd->dev, ABS_MT_WIDTH_MAJOR, 0); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0);// This must be placed at the last one. input_mt_sync(tpd->dev); }else{//Android 4.0 don't need to report these up events. int i, have_down_cnt = 0; for ( i=0; i < TINNO_TOUCH_TRACK_IDS; i++ ){ if ( test_bit(i, &ts->fingers_flag) ){ ++have_down_cnt; } } if ( have_down_cnt < 2 ){ input_mt_sync(tpd->dev); } CTP_DBG("x=%03d, y=%03d, ID=%03d, have_down=%d", x, y, trackID, have_down_cnt); } __clear_bit(trackID, &ts->fingers_flag); TPD_UP_DEBUG_TRACK(x,y); if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { tpd_button(x, y, 0); } return 0; }
static kal_uint32 charging_get_platfrom_boot_mode(void *data) { *(kal_uint32*)(data) = get_boot_mode(); battery_xlog_printk(BAT_LOG_CRTI, "[PowerSupply] get_boot_mode=%d\n", get_boot_mode()); return STATUS_OK; }
static int tpd_up(tinno_ts_data *ts, int x, int y, int pressure, int trackID) { if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { CTP_DBG("x=%03d, y=%03d, ID=%03d", x, y, trackID); input_report_abs(tpd->dev, ABS_PRESSURE, 0); input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); input_report_key(tpd->dev, BTN_TOUCH, 0); input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); #ifdef FTS_SUPPORT_TRACK_ID input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID); #endif input_report_abs(tpd->dev, ABS_MT_WIDTH_MAJOR, 0); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0);// This must be placed at the last one. input_mt_sync(tpd->dev); }else{//Android 4.0 don't need to report these up events. int i, have_down_cnt = 0; for ( i=0; i < TINNO_TOUCH_TRACK_IDS; i++ ){ if ( test_bit(i, &ts->fingers_flag) ){ ++have_down_cnt; } } if ( have_down_cnt < 2 ){ input_mt_sync(tpd->dev); } CTP_DBG("x=%03d, y=%03d, ID=%03d, have_down=%d", x, y, trackID, have_down_cnt); } __clear_bit(trackID, &ts->fingers_flag); #ifdef CONFIG_TOUCHSCREEN_SWEEP2WAKE s2w_st_flag = 0; if (sweep2wake > 0) { //printk("[sweep2wake]:line : %d | func : %s\n", __LINE__, __func__); //printk("[SWEEP2WAKE]: resetin s2w param\n"); //printk("[sweep2wake]:line : %d | func : %s\n", __LINE__, __func__); exec_count = true; barrier[0] = false; barrier[1] = false; scr_on_touch = false; tripoff = 0; tripon = 0; triptime = 0; } if (doubletap2wake && scr_suspended) { printk("[SWEEP2WAKE]: detecting d2w\n"); doubletap2wake_func(x, y, jiffies); } #endif TPD_UP_DEBUG_TRACK(x,y); if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { tpd_button(x, y, 0); } return 0; }
static kal_uint32 charging_get_platfrom_boot_mode(void *data) { kal_uint32 status = STATUS_OK; *(kal_uint32*)(data) = get_boot_mode(); battery_xlog_printk(BAT_LOG_CRTI, "get_boot_mode=%d\n", get_boot_mode()); return status; }
int get_modem_support_cap(int md_id) { if(md_id < MAX_MD_NUM) { if(((get_boot_mode()==META_BOOT) || (get_boot_mode()==ADVMETA_BOOT)) && (meta_md_support[md_id]!=0)) return meta_md_support[md_id]; else return md_support[md_id]; } return -1; }
int set_modem_support_cap(int md_id, int new_val) { if(md_id < MAX_MD_NUM) { if(((get_boot_mode()==META_BOOT) || (get_boot_mode()==ADVMETA_BOOT)) && (meta_md_support[md_id]!=0)) meta_md_support[md_id] = new_val; else md_support[md_id] = new_val; return 0; } return -1; }
static kal_uint32 charging_get_platfrom_boot_mode(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) #else *(kal_uint32*)(data) = get_boot_mode(); battery_log(BAT_LOG_CRTI, "get_boot_mode=%d\n", get_boot_mode()); #endif return status; }
int smb358_set_suspend_enable(struct opchg_charger *chip, bool enable) { int rc; if((get_boot_mode() == MSM_BOOT_MODE__RF) || (get_boot_mode() == MSM_BOOT_MODE__WLAN)) enable = 1; rc = opchg_masked_write(chip, CMD_A_REG, CMD_A_CHG_SUSP_EN_MASK, enable ? CMD_A_CHG_SUSP_EN_BIT : 0); if (rc < 0) { pr_err("Couldn't set CHG_SUSP_EN_BIT enable = %d, rc = %d\n", enable, rc); } return rc; }
static int tpd_local_init(void) { boot_mode = get_boot_mode(); // Software reset mode will be treated as normal boot if(boot_mode==3) boot_mode = NORMAL_BOOT; //boot_mode = UNKNOWN_BOOT; if(i2c_add_driver(&tpd_i2c_driver)!=0) { TPD_DMESG("unable to add i2c driver.\n"); return -1; } #ifdef TPD_HAVE_BUTTON tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data #endif #if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) TPD_DO_WARP = 1; memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT*4); memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT*4); #endif #if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) memcpy(tpd_calmat, tpd_def_calmat_local, 8*4); memcpy(tpd_def_calmat, tpd_def_calmat_local, 8*4); #endif TPD_DMESG("end %s, %d\n", __FUNCTION__, __LINE__); tpd_type_cap = 1; return 0; }
static kal_uint32 charging_get_platfrom_boot_mode(void *data) { kal_uint32 status = STATUS_OK; *(kal_uint32*)(data) = get_boot_mode(); return status; }
int tpd_local_init(void) { boot_mode = get_boot_mode(); // Software reset mode will be treated as normal boot if(boot_mode==3) boot_mode = NORMAL_BOOT; if(i2c_add_driver(&tpd_i2c_driver)!=0) TPD_DMESG("unable to add i2c driver.\n"); return 0; }
static int tpd_up(tinno_ts_data *ts, int x, int y, int pressure, int trackID) { CTP_DBG("x=%03d, y=%03d, ID=%03d", x, y, trackID); //input_report_abs(tpd->dev, ABS_PRESSURE, 0); input_report_key(tpd->dev, BTN_TOUCH, 0); //input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0); //input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); //input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); //input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID); input_mt_sync(tpd->dev); //TPD_UP_DEBUG_TRACK(x,y); if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { tpd_button(x, y, 0); } return 0; }
static void tpd_down(tinno_ts_data *ts, int x, int y, int pressure, int trackID) { CTP_DBG("x=%03d, y=%03d, pressure=%03d, ID=%03d", x, y, pressure, trackID); input_report_key(tpd->dev, BTN_TOUCH, 1); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 20); input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID); input_mt_sync(tpd->dev); if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { tpd_button(x, y, 1); } //TPD_DOWN_DEBUG_TRACK(x,y); }
static void tpd_down(tinno_ts_data *ts, int x, int y, int pressure, int trackID) { CTP_DBG("x=%03d, y=%03d, pressure=%03d, ID=%03d", x, y, pressure, trackID); input_report_abs(tpd->dev, ABS_PRESSURE, pressure); input_report_abs(tpd->dev, ABS_MT_PRESSURE, pressure); input_report_key(tpd->dev, BTN_TOUCH, 1); input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); #ifdef FTS_SUPPORT_TRACK_ID input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID); #endif input_report_abs(tpd->dev, ABS_MT_WIDTH_MAJOR, pressure*pressure/112); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, pressure*pressure/112); input_mt_sync(tpd->dev); __set_bit(trackID, &ts->fingers_flag); ts->touch_point_pre[trackID].x=x; ts->touch_point_pre[trackID].y=y; if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { tpd_button(x, y, 1); } TPD_DOWN_DEBUG_TRACK(x,y); }
int set_modem_support_cap(int md_id, int new_val) { if(md_id < MAX_MD_NUM) { if(((get_boot_mode()==META_BOOT) || (get_boot_mode()==ADVMETA_BOOT)) && (meta_md_support[md_id]!=0)) meta_md_support[md_id] = new_val; else //modify by qicai.gu for 101253 for load the lwg modem begin //md_support[md_id] = new_val; { #ifdef CONFIG_MTK_MD1_SUPPORT md_support[md_id] = CONFIG_MTK_MD1_SUPPORT; #else md_support[md_id] = new_val; #endif } //modify by qicai.gu for 101253 for load the lwg modem end return 0; } return -1; }
static void tpd_down(tinno_ts_data *ts, int x, int y, int pressure, int trackID) { int iPressure = pressure*pressure/110; if ( iPressure < 1 ){ iPressure = 1; } CTP_DBG("x=%03d, y=%03d, pressure=%03d, ID=%03d", x, y, pressure, trackID); input_report_abs(tpd->dev, ABS_PRESSURE, iPressure); input_report_abs(tpd->dev, ABS_MT_PRESSURE, iPressure); input_report_key(tpd->dev, BTN_TOUCH, 1); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 20); input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); printk("[SWEEP2WAKE]: tpd down\n"); #ifdef CONFIG_TOUCHSCREEN_SWEEP2WAKE if (sweep2wake) { //printk("[SWEEP2WAKE]: detecting sweep\n"); detect_sweep2wake(x, y, jiffies, trackID); } #endif #ifdef FTS_SUPPORT_TRACK_ID input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID); #endif input_report_abs(tpd->dev, ABS_MT_WIDTH_MAJOR, iPressure); input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, iPressure); input_mt_sync(tpd->dev); __set_bit(trackID, &ts->fingers_flag); ts->touch_point_pre[trackID].x=x; ts->touch_point_pre[trackID].y=y; if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) { tpd_button(x, y, 1); } TPD_DOWN_DEBUG_TRACK(x,y); }
int aee_kernel_wdt_kick_api(int kinterval) { int ret = 0; #ifdef CONFIG_MTK_AEE_POWERKEY_HANG_DETECT if (pwk_start_monitor && (get_boot_mode() == NORMAL_BOOT) && (FindTaskByName("system_server") != -1)) { /* Only in normal_boot! */ LOGE("Press powerkey!! g_boot_mode=%d,wdt_kick_status=0x%x,tickTimes=0x%x,g_kinterval=%d,RT[%lld]\n", get_boot_mode(), wdt_kick_status, hwt_kick_times, kinterval, sched_clock()); hwt_kick_times++; if ((kinterval * hwt_kick_times > 180)) /* only monitor 3 min */ { pwk_start_monitor = 0; /* check all modules is ok~~~ */ if ((wdt_kick_status & (WDT_SETBY_Display | WDT_SETBY_SF)) != (WDT_SETBY_Display | WDT_SETBY_SF)) { if(aee_mode!=AEE_MODE_CUSTOMER_USER) //disable for display not ready { //ShowStatus(); /* catch task kernel bt */ //LOGE("[WDK] Powerkey Tick fail,kick_status 0x%08x,RT[%lld]\n ", // wdt_kick_status, sched_clock()); //aee_kernel_warning_api(__FILE__, __LINE__, DB_OPT_NE_JBT_TRACES|DB_OPT_DISPLAY_HANG_DUMP, "\nCRDISPATCH_KEY:UI Hang(Powerkey)\n", // "Powerkey Monitor"); //msleep(30 * 1000); } else { //ShowStatus(); /* catch task kernel bt */ //LOGE("[WDK] Powerkey Tick fail,kick_status 0x%08x,RT[%lld]\n ", // wdt_kick_status, sched_clock()); //aee_kernel_exception_api(__FILE__, __LINE__, DB_OPT_NE_JBT_TRACES|DB_OPT_DISPLAY_HANG_DUMP, "\nCRDISPATCH_KEY:UI Hang(Powerkey)\n", // "Powerkey Monitor"); //msleep(30 * 1000); //ret = WDT_PWK_HANG_FORCE_HWT; /* trigger HWT */ } } } if ((wdt_kick_status & (WDT_SETBY_Display | WDT_SETBY_SF)) == (WDT_SETBY_Display | WDT_SETBY_SF)) { pwk_start_monitor = 0; LOGE("[WDK] Powerkey Tick ok,kick_status 0x%08x,RT[%lld]\n ", wdt_kick_status, sched_clock()); } } #endif return ret; }
int board_mmc_init(bd_t *bis) { int ret; if (get_boot_mode() == BOOT_MODE_SD) { ret = init_mmc(); ret |= init_dwmmc(); } else { ret = init_dwmmc(); ret |= init_mmc(); } if (ret) debug("mmc init failed\n"); return ret; }
char *get_dfu_alt_boot(void) { char *alt_boot; switch (get_boot_mode()) { case BOOT_MODE_SD: alt_boot = CONFIG_DFU_ALT_BOOT_SD; break; case BOOT_MODE_EMMC: case BOOT_MODE_EMMC_SD: alt_boot = CONFIG_DFU_ALT_BOOT_EMMC; break; default: alt_boot = NULL; break; } return alt_boot; }
static void tinno_update_tp_button_dim(int panel_vendor) { //LINE<JIRA_ID><DATE20130107><ftm set key>zenghaihui int i; #ifdef TPD_HAVE_BUTTON if (FACTORY_BOOT == get_boot_mode()) { for (i = 0; i < TPD_KEY_COUNT ; i++) tpd_keys_local[i] = TPD_KEYSFACTORY[i]; } #endif if ( FTS_CTP_VENDOR_NANBO == panel_vendor ){ tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local_NB); }else{ tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local_BYD); } }
/* OPPO zhanglong add 2013-08-30 for ftm test LCD backlight */ static ssize_t ftmbacklight_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int level; if (!count) return -EINVAL; #if 0 /* this function is for ftm mode, it doesn't work when normal boot */ if(get_boot_mode() == MSM_BOOT_MODE__FACTORY) { level = simple_strtoul(buf, NULL, 10); lm3630_bank_a_update_status(level); } #endif level = simple_strtoul(buf, NULL, 10); lm3630_bank_a_update_status(level); return count; }
/* Xiaori.Yuan@Mobile Phone Software Dept.Driver, 2014/02/17 Add for set cabc */ int set_backlight_pwm(int state) { int rc = 0; //if (get_pcb_version() < HW_VERSION__20) { /* For Find7 */ if (get_boot_mode() == MSM_BOOT_MODE__NORMAL) { if( state == 1 && backlight_level <= 0x14 ) return rc; if(state == 1) { rc = regmap_update_bits(lm3630_pchip->regmap, REG_CONFIG, 0x01, 0x01); pwm_flag = true; } else { rc = regmap_update_bits(lm3630_pchip->regmap, REG_CONFIG, 0x01, 0x00); pwm_flag = false; } } //} return rc; }
int tpd_local_init(void) { int i; tp_boot_mode = get_boot_mode(); // Software reset mode will be treated as normal boot if(tp_boot_mode==3) tp_boot_mode = NORMAL_BOOT; TPD_DEBUG("tpd_local_init boot mode = %d\n",tp_boot_mode); if(i2c_add_driver(&tpd_i2c_driver)!=0) TPD_DEBUG("unable to add i2c driver.\n"); if(tpd_load_status == 0) { TPD_DMESG("ft5206 add error touch panel driver.\n"); i2c_del_driver(&tpd_i2c_driver); return -1; } #ifdef TPD_HAVE_BUTTON if (FACTORY_BOOT == tp_boot_mode) { for (i = 0; i < TPD_KEY_COUNT ; i++) tpd_keys_local[i] = TPD_KEYSFACTORY[i]; } tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data #endif #if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) TPD_DO_WARP = 1; memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT*4); memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT*4); #endif #if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) memcpy(tpd_calmat, tpd_calmat_local, 8*4); memcpy(tpd_def_calmat, tpd_def_calmat_local, 8*4); #endif TPD_DMESG("end %s, %d\n", __FUNCTION__, __LINE__); tpd_type_cap = 1; return 0; }
int aee_kernel_wdt_kick_api(int kinterval) { int ret=0; #ifdef CONFIG_MTK_AEE_POWERKEY_HANG_DETECT if (pwk_start_monitor && (get_boot_mode() == NORMAL_BOOT) && (FindTaskByName("system_server") != -1)) { /* Only in normal_boot! */ LOGE("Press powerkey!! g_boot_mode=%d,wdt_kick_status=0x%x,tickTimes=0x%x,g_kinterval=%d,RT[%lld]\n",get_boot_mode(),wdt_kick_status,hwt_kick_times,kinterval,sched_clock()); hwt_kick_times++; if ((kinterval * hwt_kick_times > 180)) /* only monitor 3 min */ { pwk_start_monitor=0; /* check all modules is ok~~~ */ if ((wdt_kick_status & (WDT_SETBY_Display | WDT_SETBY_SF)) != (WDT_SETBY_Display | WDT_SETBY_SF)) { #ifdef CONFIG_MT_ENG_BUILD ShowStatus(); /* catch task kernel bt */ LOGE("[WDK] Powerkey Tick fail,kick_status 0x%08x,RT[%lld]\n ", wdt_kick_status, sched_clock()); aee_kernel_warning("\nCRDISPATCH_KEY:UI Hang(Powerkey)\n", "Powerkey Monitor"); #else ShowStatus(); /* catch task kernel bt */ LOGE("[WDK] Powerkey Tick fail,kick_status 0x%08x,RT[%lld]\n ", wdt_kick_status, sched_clock()); ret = WDT_PWK_HANG_FORCE_HWT; /* trigger HWT */ #endif } } if ((wdt_kick_status & (WDT_SETBY_Display | WDT_SETBY_SF)) == (WDT_SETBY_Display | WDT_SETBY_SF)) { pwk_start_monitor=0; LOGE("[WDK] Powerkey Tick ok,kick_status 0x%08x,RT[%lld]\n ", wdt_kick_status, sched_clock()); } } #endif return ret; }
int sdio_detect_do_autok(int chipId) { #if MTK_HIF_SDIO_AUTOK_ENABLED BOOTMODE boot_mode; boot_mode = get_boot_mode(); if (boot_mode == META_BOOT) { WMT_DETECT_INFO_FUNC("omit autok in meta mode\n"); return 0; } if (0x6630 == chipId) { #ifdef CONFIG_SDIOAUTOK_SUPPORT if (NULL!= g_func) { WMT_DETECT_INFO_FUNC("wait_sdio_autok_ready++\n"); wait_sdio_autok_ready(g_func->card->host); WMT_DETECT_INFO_FUNC("wait_sdio_autok_ready--\n"); } else { WMT_DETECT_INFO_FUNC("g_func NULL, omit autok\n"); } #else WMT_DETECT_INFO_FUNC("MTK_SDIOAUTOK_SUPPORT not defined\n"); #endif } else { WMT_DETECT_INFO_FUNC("MT%x does not support SDIO3.0 autoK is not needed\n", chipId); } #else WMT_DETECT_INFO_FUNC("MTK_HIF_SDIO_AUTOK_ENABLED is not defined\n"); #endif return 0; }
static int mt8193_video_config(enum HDMI_VIDEO_RESOLUTION vformat, enum HDMI_VIDEO_INPUT_FORMAT vin, enum HDMI_VIDEO_OUTPUT_FORMAT vout) { HDMI_DEF_LOG("[hdmi]mt8193_video_config:%d\n", vformat); _stAvdAVInfo.e_resolution = vformat; vSetHDMITxPLLTrigger(); vResetHDMIPLL(); _stAvdAVInfo.fgHdmiTmdsEnable = 0; av_hdmiset(HDMI_SET_TURN_OFF_TMDS, &_stAvdAVInfo, 1); av_hdmiset(HDMI_SET_VPLL, &_stAvdAVInfo, 1); av_hdmiset(HDMI_SET_SOFT_NCTS, &_stAvdAVInfo, 1); av_hdmiset(HDMI_SET_VIDEO_RES_CHG, &_stAvdAVInfo, 1); if (get_boot_mode() != FACTORY_BOOT) av_hdmiset(HDMI_SET_HDCP_INITIAL_AUTH, &_stAvdAVInfo, 1); mt8193_hdmiinit = 1; return 0; }
static int queue_com_triggers_action() { int boot_mode; int meta_com_id; boot_mode = get_boot_mode(); meta_com_id = get_meta_com_id(); /* If enter META mode and met_com_id == 1, enable single com mode * If enter ATE FACTORY mode, enable single com mode * Else andble compostie USB mode * Please refernce meta_inti.rc and init.factory.rc */ //if ((boot_mode == 1 && meta_com_id == 1) // || (boot_mode == 6)) { if(meta_com_id && (boot_mode == 1 || boot_mode == 6 || boot_mode == 4)) { property_set("sys.usb.com_config", "1"); } else { property_set("sys.usb.com_config", "0"); } return 0; }
void vUnBlackHDMIOnly(void) { MT8193_DRV_FUNC(); if (get_boot_mode() != FACTORY_BOOT) *(unsigned int *)(0xf400f0b4) = 0x0; }