void set_charging_current(void) { static int old_status = -1; int current_status = -1; if( !get_madc_probe_done() ) return ; current_status = get_external_power_status(); if( old_status != current_status ) { if( -1 == lge_usb_acc_detect()) return ; #ifdef CONFIG_LGE_BATT_THERM_LAB3_SCENARIO need_to_batt_therm_sett = 1; #endif set_charging_current_sub(); old_status = current_status; } charger_state_update_by_other(); return ; }
void set_charging_current(void) { static int old_status = -1; int current_status = -1; if( !get_madc_probe_done() ) return ; current_status = get_external_power_status(); if( old_status != current_status ) { /* mbk_temp */ lge_usb_acc_detect(); switch( get_ext_pwr_type() ) { case NO_CABLE: break; case LT_CABLE: // if LT_Cable, u-boot already set charing current. in kernel no need to set //charging_ic_set_factory_mode(); /* mbk_temp HW Request */ setting_for_factory_mode_hw_req(); break; case TA_CABLE: case FORGED_TA_CABLE: charging_ic_set_ta_mode(); break; } printk("[charging_msg] %s, External Power Type %d \n", __FUNCTION__, get_ext_pwr_type()); old_status = current_status; } charger_state_update_by_other(); return ; }