@@ -557,7 +557,9 @@ static int ab8500_btemp_id(struct ab8500_btemp *di)
/* BATTERY_UNKNOWN is defined on position 0, skip it! */
for (i = BATTERY_UNKNOWN + 1; i < di->bat->n_btypes; i++) {
if ((res <= di->bat->bat_type[i].resis_high) &&
- (res >= di->bat->bat_type[i].resis_low)) {
+ (res >= di->bat->bat_type[i].resis_low) &&
+ (di->bat->bat_type[i].adc_therm ==
+ di->bat->adc_therm)) {
dev_dbg(di->dev, "Battery detected on %s"
" low %d < res %d < high: %d"
" index: %d\n",
@@ -270,6 +270,7 @@ struct abx500_maxim_parameters {
* @low_high_cur_lvl: charger current in temp low/high state in mA
* @low_high_vol_lvl: charger voltage in temp low/high state in mV'
* @battery_resistance: battery inner resistance in mOhm.
+ * @adc_therm: battery uses controller or resistor for temp.
* @n_r_t_tbl_elements: number of elements in r_to_t_tbl
* @r_to_t_tbl: table containing resistance to temp points
* @n_v_cap_tbl_elements: number of elements in v_to_cap_tbl
@@ -297,6 +298,7 @@ struct abx500_battery_type {
int low_high_cur_lvl;
int low_high_vol_lvl;
int battery_resistance;
+ enum abx500_adc_therm adc_therm;
int n_temp_tbl_elements;
struct abx500_res_to_temp *r_to_t_tbl;
int n_v_cap_tbl_elements;