Lines Matching full:capacity

171  * @init_capacity:	Indicate if initial capacity measuring should be done
179 * @bat_cap: Structure for battery capacity specific parameters
180 * @avg_cap: Average capacity filter
371 * ab8500_fg_add_cap_sample() - Add capacity to average filter
373 * @sample: the capacity in mAh to add to the filter
375 * A capacity is added to the filter and a new mean capacity is calculated and
410 * The capacity filter is reset to zero.
431 * @sample: the capacity in mAh to fill the filter with
433 * The capacity filter is filled with a capacity in mAh
846 * ab8500_fg_volt_to_capacity() - Voltage based capacity
848 * @voltage_uv: The voltage to convert to a capacity in microvolt
850 * Returns battery capacity in per mille based on voltage
856 /* Multiply by 10 because the capacity is tracked in per mille */ in ab8500_fg_volt_to_capacity()
861 * ab8500_fg_uncomp_volt_to_capacity() - Uncompensated voltage based capacity
864 * Returns battery capacity based on battery voltage that is not compensated
978 * ab8500_fg_load_comp_volt_to_capacity() - Load compensated voltage based capacity
981 * Returns battery capacity based on battery voltage that is load compensated
994 * ab8500_fg_convert_mah_to_permille() - Capacity in mAh to permille
996 * @cap_mah: capacity in mAh
998 * Converts capacity in mAh to capacity in permille
1006 * ab8500_fg_convert_permille_to_mah() - Capacity in permille to mAh
1008 * @cap_pm: capacity in permille
1010 * Converts capacity in permille to capacity in mAh
1018 * ab8500_fg_convert_mah_to_uwh() - Capacity in mAh to uWh
1020 * @cap_mah: capacity in mAh
1022 * Converts capacity in mAh to capacity in uWh
1030 * Capacity is in milli ampere hours (10^-3)Ah in ab8500_fg_convert_mah_to_uwh()
1045 * ab8500_fg_calc_cap_charging() - Calculate remaining capacity while charging
1048 * Return the capacity in mAh based on previous calculated capcity and the FG
1049 * accumulator register value. The filter is filled with this capacity
1058 /* Capacity should not be less than 0 */ in ab8500_fg_calc_cap_charging()
1064 * We force capacity to 100% once when the algorithm in ab8500_fg_calc_cap_charging()
1084 * ab8500_fg_calc_cap_discharge_voltage() - Capacity in discharge with voltage
1087 * Return the capacity in mAh based on the load compensated battery voltage.
1107 * ab8500_fg_calc_cap_discharge_fg() - Capacity in discharge with FG
1110 * Return the capacity in mAh based on previous calculated capcity and the FG
1123 /* Capacity should not be less than 0 */ in ab8500_fg_calc_cap_discharge_fg()
1133 * Check against voltage based capacity. It can not be lower in ab8500_fg_calc_cap_discharge_fg()
1160 * ab8500_fg_capacity_level() - Get the battery capacity level
1163 * Get the battery capacity level based on the capacity in percent
1187 * ab8500_fg_calculate_scaled_capacity() - Capacity scaling
1190 * Calculates the capacity to be shown to upper layers. Scales the capacity
1191 * to have 100% as a reference from the actual capacity upon removal of charger
1197 int capacity = di->bat_cap.prev_percent; in ab8500_fg_calculate_scaled_capacity() local
1200 return capacity; in ab8500_fg_calculate_scaled_capacity()
1203 * As long as we are in fully charge mode scale the capacity in ab8500_fg_calculate_scaled_capacity()
1209 max(capacity, di->bm->fg_params->maint_thres); in ab8500_fg_calculate_scaled_capacity()
1214 /* Calculates the scaled capacity. */ in ab8500_fg_calculate_scaled_capacity()
1217 capacity = min(100, in ab8500_fg_calculate_scaled_capacity()
1223 if (capacity < cs->disable_cap_level) { in ab8500_fg_calculate_scaled_capacity()
1224 cs->disable_cap_level = capacity; in ab8500_fg_calculate_scaled_capacity()
1230 dev_dbg(di->dev, "Disabling scaled capacity\n"); in ab8500_fg_calculate_scaled_capacity()
1232 capacity = di->bat_cap.prev_percent; in ab8500_fg_calculate_scaled_capacity()
1237 capacity = cs->disable_cap_level; in ab8500_fg_calculate_scaled_capacity()
1242 return capacity; in ab8500_fg_calculate_scaled_capacity()
1246 * ab8500_fg_update_cap_scalers() - Capacity scaling
1250 * the capacity scalers.
1280 * ab8500_fg_check_capacity_limits() - Check if capacity has changed
1282 * @init: capacity is allowed to go up in init mode
1284 * Check if capacity or capacity limit has changed and notify the system
1296 * We do not allow reported capacity level to go up in ab8500_fg_check_capacity_limits()
1315 * If we have received the LOW_BAT IRQ, set capacity to 0 to initiate in ab8500_fg_check_capacity_limits()
1319 dev_dbg(di->dev, "Battery low, set capacity to 0\n"); in ab8500_fg_check_capacity_limits()
1348 "but capacity dropping: %d\n", in ab8500_fg_check_capacity_limits()
1369 * We do not allow reported capacity to go up in ab8500_fg_check_capacity_limits()
1373 "capacity changed from %d to %d (%d)\n", in ab8500_fg_check_capacity_limits()
1382 dev_dbg(di->dev, "capacity not allowed to go up since " in ab8500_fg_check_capacity_limits()
1395 dev_info(di->dev, "capacity=%d (%d)\n", in ab8500_fg_check_capacity_limits()
1437 * Battery capacity calculation state machine for when we're charging
1461 * Read the FG and calculate the new capacity in ab8500_fg_algorithm_charging()
1483 /* Check capacity limits */ in ab8500_fg_algorithm_charging()
1523 dev_dbg(di->dev, "Capacity limits:" in check_sysfs_capacity()
1527 /* If within limits, use the saved capacity and exit estimation...*/ in check_sysfs_capacity()
1533 dev_dbg(di->dev, "Capacity from user out of limits, ignoring"); in check_sysfs_capacity()
1541 * Battery capacity calculation state machine for when we're discharging
1565 * samples to get an initial capacity. in ab8500_fg_algorithm_discharging()
1761 * Entry point for the battery capacity calculation state machine
1807 /* Get an initial capacity calculation */ in ab8500_fg_periodic_work()
2094 * charge_full_design: capacity where battery is considered full
2095 * charge_now: battery capacity in nAh
2096 * capacity: capacity in percent
2097 * capacity_level: capacity level
2109 * batteries is disabled, we always report 100% capacity and in ab8500_fg_get_property()
2110 * capacity level UNKNOWN, since we can't calculate in ab8500_fg_get_property()
2111 * remaining capacity in ab8500_fg_get_property()
2228 /* Save current capacity as maximum */ in ab8500_fg_get_ext_psy_data()
2412 * Used to reset the current battery capacity to be able to
2413 * retrigger a new voltage base capacity calculation. For