static int do_detect_factory_cable(void) { int cable_type = msm_chg_LG_cable_type(); if((cable_type == LG_FACTORY_CABLE_130K_TYPE) || (cable_type == LG_FACTORY_CABLE_130K_TYPE)) return 1; else return 0; }
/* LGE_CHANGES_S [[email protected]] 2011-02-09, need to check LT cable type */ int get_msm_cable_type(void) { unsigned int cable_type; #if 0 int fn_type = CUSTOMER_CMD1_GET_CABLE_TYPE; msm_proc_comm(PCOM_CUSTOMER_CMD1, &cable_type,&fn_type); printk("[LGE_PWR] cable type detection from muic at modem side Cable=%d \n",cable_type); #else unsigned int modem_cable_type; extern int msm_chg_LG_cable_type(void); modem_cable_type = msm_chg_LG_cable_type(); switch(modem_cable_type) { case 0: //NOINIT_CABLE case 9: //NO_CABLE cable_type = LG_NONE_CABLE; break; case 1: //UNKNOWN_CABLE cable_type = LG_UNKNOWN_CABLE; break; case 2: //TA_CABLE case 5: // FORGED_TA_CABLE case 8: // C1A_TA_CABLE cable_type = LG_WALL_CHARGER_CABLE; break; case 3: // LT_CABLE cable_type = LG_FACTORY_CABLE_56K_TYPE; break; case 4: // USB_CABLE case 6: //ABNORMAL_USB_CABLE case 7 : //ABNORMAL_USB_400c_CABLE cable_type = LG_NORMAL_USB_CABLE; break; case 10: // LT_CABLE_130K cable_type = LG_FACTORY_CABLE_130K_TYPE; break; case 11: // LT_CABLE_910K cable_type = LG_FACTORY_CABLE_910K_TYPE; break; default: cable_type = LG_NONE_CABLE; } #endif return cable_type; }
static int do_get_usb_serial_number(char *serial_number) { memset(serial_number, 0, MAX_SERIAL_NO_LEN); msm_get_MEID_type(serial_number); printk(KERN_ERR "LG_FW :: %s Serail number %s \n",__func__, serial_number); if(!strcmp(serial_number,"00000000000000")) serial_number[0] = '\0'; #if 0 if(msm_chg_LG_cable_type() == LT_ADB_CABLE) { sprintf(serial_number,"%s","LGE_ANDROID_DE"); } #endif return 0; }