Lines Matching refs:bm
228 struct ab8500_bm_data *bm; member
366 if (curr > -di->bm->fg_params->high_curr_threshold) in ab8500_fg_is_low_curr()
673 (1000 * di->bm->fg_res); in ab8500_fg_inst_curr_finalize()
797 (100 * di->bm->fg_res); in ab8500_fg_acc_cur_work()
806 (1000 * di->bm->fg_res * (di->fg_samples / 4)); in ab8500_fg_acc_cur_work()
815 di->bm->fg_res, di->fg_samples, val, di->accu_charge); in ab8500_fg_acc_cur_work()
860 tbl = di->bm->bat_type[di->bm->batt_id].v_to_cap_tbl; in ab8500_fg_volt_to_capacity()
861 tbl_size = di->bm->bat_type[di->bm->batt_id].n_v_cap_tbl_elements; in ab8500_fg_volt_to_capacity()
913 tbl = di->bm->bat_type[di->bm->batt_id].batres_tbl; in ab8500_fg_battery_resistance()
914 tbl_size = di->bm->bat_type[di->bm->batt_id].n_batres_tbl_elements; in ab8500_fg_battery_resistance()
936 __func__, di->bat_temp, resist, di->bm->fg_res / 10, in ab8500_fg_battery_resistance()
937 (di->bm->fg_res / 10) + resist); in ab8500_fg_battery_resistance()
940 resist += di->bm->fg_res / 10; in ab8500_fg_battery_resistance()
1158 if (percent <= di->bm->cap_levels->critical || in ab8500_fg_capacity_level()
1161 else if (percent <= di->bm->cap_levels->low) in ab8500_fg_capacity_level()
1163 else if (percent <= di->bm->cap_levels->normal) in ab8500_fg_capacity_level()
1165 else if (percent <= di->bm->cap_levels->high) in ab8500_fg_capacity_level()
1196 max(capacity, di->bm->fg_params->maint_thres); in ab8500_fg_calculate_scaled_capacity()
1258 di->bm->fg_params->maint_thres); in ab8500_fg_update_cap_scalers()
1325 di->bm->capacity_scaling) { in ab8500_fg_check_capacity_limits()
1378 if (di->bm->capacity_scaling) { in ab8500_fg_check_capacity_limits()
1439 di->bm->fg_params->accu_charging); in ab8500_fg_algorithm_charging()
1501 lower = di->bat_cap.permille - di->bm->fg_params->user_cap_limit * 10; in check_sysfs_capacity()
1502 upper = di->bat_cap.permille + di->bm->fg_params->user_cap_limit * 10; in check_sysfs_capacity()
1542 di->fg_samples = SEC_TO_SAMPLE(di->bm->fg_params->init_timer); in ab8500_fg_algorithm_discharging()
1555 sleep_time = di->bm->fg_params->init_timer; in ab8500_fg_algorithm_discharging()
1558 if (di->init_cnt > di->bm->fg_params->init_discard_time) { in ab8500_fg_algorithm_discharging()
1565 if (di->init_cnt > di->bm->fg_params->init_total_time) in ab8500_fg_algorithm_discharging()
1580 sleep_time = di->bm->fg_params->recovery_sleep_timer; in ab8500_fg_algorithm_discharging()
1592 di->bm->fg_params->recovery_total_time) { in ab8500_fg_algorithm_discharging()
1594 di->bm->fg_params->accu_high_curr); in ab8500_fg_algorithm_discharging()
1607 di->bm->fg_params->accu_high_curr); in ab8500_fg_algorithm_discharging()
1616 di->bm->fg_params->accu_high_curr); in ab8500_fg_algorithm_discharging()
1663 di->bm->fg_params->accu_high_curr; in ab8500_fg_algorithm_discharging()
1665 di->bm->fg_params->high_curr_time) in ab8500_fg_algorithm_discharging()
1679 di->bm->fg_params->accu_high_curr); in ab8500_fg_algorithm_discharging()
1874 if (vbat < di->bm->fg_params->lowbat_threshold) { in ab8500_fg_low_bat_work()
1936 sel0 = di->bm->fg_params->battok_falling_th_sel0; in ab8500_fg_battok_init_hw_register()
1937 sel1 = di->bm->fg_params->battok_raising_th_sel1; in ab8500_fg_battok_init_hw_register()
2123 if (di->flags.batt_unknown && !di->bm->chg_unknown_bat && in ab8500_fg_get_property()
2138 if (di->flags.batt_unknown && !di->bm->chg_unknown_bat && in ab8500_fg_get_property()
2145 if (di->flags.batt_unknown && !di->bm->chg_unknown_bat && in ab8500_fg_get_property()
2152 if (di->flags.batt_unknown && !di->bm->chg_unknown_bat && in ab8500_fg_get_property()
2204 if (di->bm->capacity_scaling) in ab8500_fg_get_ext_psy_data()
2223 if (di->bm->capacity_scaling) in ab8500_fg_get_ext_psy_data()
2237 di->bm->batt_id != BATTERY_UNKNOWN) { in ab8500_fg_get_ext_psy_data()
2240 b = &(di->bm->bat_type[di->bm->batt_id]); in ab8500_fg_get_ext_psy_data()
2317 di->bm->fg_params->lowbat_threshold) << 1 | in ab8500_fg_init_hw_registers()
2333 AB8505_RTC_PCUT_MAX_TIME_REG, di->bm->fg_params->pcut_max_time); in ab8500_fg_init_hw_registers()
2341 AB8505_RTC_PCUT_FLAG_TIME_REG, di->bm->fg_params->pcut_flag_time); in ab8500_fg_init_hw_registers()
2349 AB8505_RTC_PCUT_RESTART_REG, di->bm->fg_params->pcut_max_restart); in ab8500_fg_init_hw_registers()
2357 AB8505_RTC_PCUT_DEBOUNCE_REG, di->bm->fg_params->pcut_debounce_time); in ab8500_fg_init_hw_registers()
2365 AB8505_RTC_PCUT_CTL_STATUS_REG, di->bm->fg_params->pcut_enable); in ab8500_fg_init_hw_registers()
3061 di->bm = &ab8500_bm_data; in ab8500_fg_probe()
3081 di->bm->bat_type[di->bm->batt_id].charge_full_design; in ab8500_fg_probe()
3085 di->vbat_nom = di->bm->bat_type[di->bm->batt_id].nominal_voltage; in ab8500_fg_probe()
3138 di->fg_samples = SEC_TO_SAMPLE(di->bm->fg_params->init_timer); in ab8500_fg_probe()