Lines Matching defs:bat
80 * @bat: Pointer to the abx500_bm platform data
97 struct abx500_bm_data *bat;
150 if (di->bat->adc_therm == ABx500_ADC_THERM_BATCTRL) {
156 - di->bat->gnd_lift_resistance * inst_curr)
212 if (di->bat->adc_therm == ABx500_ADC_THERM_BATCTRL && enable) {
244 } else if (di->bat->adc_therm == ABx500_ADC_THERM_BATCTRL && !enable) {
460 id = di->bat->batt_id;
462 if (di->bat->adc_therm == ABx500_ADC_THERM_BATCTRL &&
477 di->bat->bat_type[id].r_to_t_tbl,
478 di->bat->bat_type[id].n_temp_tbl_elements, rbat);
494 di->bat->bat_type[id].r_to_t_tbl,
495 di->bat->bat_type[id].n_temp_tbl_elements, rntc);
516 di->bat->batt_id = BATTERY_UNKNOWN;
525 for (i = BATTERY_UNKNOWN + 1; i < di->bat->n_btypes; i++) {
526 if ((res <= di->bat->bat_type[i].resis_high) &&
527 (res >= di->bat->bat_type[i].resis_low)) {
531 di->bat->adc_therm == ABx500_ADC_THERM_BATCTRL ?
533 di->bat->bat_type[i].resis_low, res,
534 di->bat->bat_type[i].resis_high, i);
536 di->bat->batt_id = i;
541 if (di->bat->batt_id == BATTERY_UNKNOWN) {
551 if (di->bat->adc_therm == ABx500_ADC_THERM_BATCTRL &&
552 di->bat->batt_id == 1) {
557 return di->bat->batt_id;
580 interval = di->bat->temp_interval_chg;
582 interval = di->bat->temp_interval_nochg;
809 val->intval = di->bat->bat_type[di->bat->batt_id].name;
989 di->bat = plat_data->battery;
990 if (!di->bat) {