Added extra logging for battery driver. Probably not needed in general, but handy for figuring out extended battery support.
This commit is contained in:
parent
42948d8a53
commit
5f3a06931a
@ -677,10 +677,18 @@ static BOOL __battery_param_udpate(struct battery_type *battery)
|
||||
// if ( id_conversion ) battery->id_ohm = ((float)id_R_kohm / ((float)id_adc_resl/battery->id_adc - 1)) * 1000; // kohm -> ohm
|
||||
// else battery->id_ohm = battery->id_adc;
|
||||
battery->id_ohm = battery->id_adc;
|
||||
#if HTC_ENABLE_POWER_DEBUG
|
||||
printk(DRIVER_ZONE " battery.id_ohm pre calibrate: %d\n", battery->id_ohm);
|
||||
#endif /* HTC_ENABLE_POWER_DEBUG*/
|
||||
calibrate_id_ohm(battery);
|
||||
#if HTC_ENABLE_POWER_DEBUG
|
||||
printk(DRIVER_ZONE " battery.id_ohm post calibrate: %d\n", battery->id_ohm);
|
||||
#endif /* HTC_ENABLE_POWER_DEBUG*/
|
||||
|
||||
batt_id_index = get_id_index(battery);
|
||||
|
||||
#if HTC_ENABLE_POWER_DEBUG
|
||||
printk(DRIVER_ZONE " batt_id: %d\n", batt_id_index);
|
||||
#endif /* HTC_ENABLE_POWER_DEBUG*/
|
||||
if (is_allow_batt_id_change) {
|
||||
/*! TODO: batt_id changes immediately; may need to modify in future*/
|
||||
if (batt_id_stable_counter >= 3 && batt_id_index != battery->id_index){
|
||||
|
Loading…
Reference in New Issue
Block a user