Lines Matching full:capacity

176  * @init_capacity:	Indicate if initial capacity measuring should be done
184 * @bat_cap: Structure for battery capacity specific parameters
185 * @avg_cap: Average capacity filter
376 * ab8500_fg_add_cap_sample() - Add capacity to average filter
378 * @sample: the capacity in mAh to add to the filter
380 * A capacity is added to the filter and a new mean capacity is calculated and
415 * The capacity filter is reset to zero.
436 * @sample: the capacity in mAh to fill the filter with
438 * The capacity filter is filled with a capacity in mAh
851 * ab8500_fg_volt_to_capacity() - Voltage based capacity
853 * @voltage_uv: The voltage to convert to a capacity in microvolt
855 * Returns battery capacity in per mille based on voltage
861 /* Multiply by 10 because the capacity is tracked in per mille */ in ab8500_fg_volt_to_capacity()
866 * ab8500_fg_uncomp_volt_to_capacity() - Uncompensated voltage based capacity
869 * Returns battery capacity based on battery voltage that is not compensated
983 * ab8500_fg_load_comp_volt_to_capacity() - Load compensated voltage based capacity
986 * Returns battery capacity based on battery voltage that is load compensated
999 * ab8500_fg_convert_mah_to_permille() - Capacity in mAh to permille
1001 * @cap_mah: capacity in mAh
1003 * Converts capacity in mAh to capacity in permille
1011 * ab8500_fg_convert_permille_to_mah() - Capacity in permille to mAh
1013 * @cap_pm: capacity in permille
1015 * Converts capacity in permille to capacity in mAh
1023 * ab8500_fg_convert_mah_to_uwh() - Capacity in mAh to uWh
1025 * @cap_mah: capacity in mAh
1027 * Converts capacity in mAh to capacity in uWh
1035 * Capacity is in milli ampere hours (10^-3)Ah in ab8500_fg_convert_mah_to_uwh()
1050 * ab8500_fg_calc_cap_charging() - Calculate remaining capacity while charging
1053 * Return the capacity in mAh based on previous calculated capcity and the FG
1054 * accumulator register value. The filter is filled with this capacity
1063 /* Capacity should not be less than 0 */ in ab8500_fg_calc_cap_charging()
1069 * We force capacity to 100% once when the algorithm in ab8500_fg_calc_cap_charging()
1089 * ab8500_fg_calc_cap_discharge_voltage() - Capacity in discharge with voltage
1092 * Return the capacity in mAh based on the load compensated battery voltage.
1112 * ab8500_fg_calc_cap_discharge_fg() - Capacity in discharge with FG
1115 * Return the capacity in mAh based on previous calculated capcity and the FG
1128 /* Capacity should not be less than 0 */ in ab8500_fg_calc_cap_discharge_fg()
1138 * Check against voltage based capacity. It can not be lower in ab8500_fg_calc_cap_discharge_fg()
1165 * ab8500_fg_capacity_level() - Get the battery capacity level
1168 * Get the battery capacity level based on the capacity in percent
1192 * ab8500_fg_calculate_scaled_capacity() - Capacity scaling
1195 * Calculates the capacity to be shown to upper layers. Scales the capacity
1196 * to have 100% as a reference from the actual capacity upon removal of charger
1202 int capacity = di->bat_cap.prev_percent; in ab8500_fg_calculate_scaled_capacity() local
1205 return capacity; in ab8500_fg_calculate_scaled_capacity()
1208 * As long as we are in fully charge mode scale the capacity in ab8500_fg_calculate_scaled_capacity()
1214 max(capacity, di->bm->fg_params->maint_thres); in ab8500_fg_calculate_scaled_capacity()
1219 /* Calculates the scaled capacity. */ in ab8500_fg_calculate_scaled_capacity()
1222 capacity = min(100, in ab8500_fg_calculate_scaled_capacity()
1228 if (capacity < cs->disable_cap_level) { in ab8500_fg_calculate_scaled_capacity()
1229 cs->disable_cap_level = capacity; in ab8500_fg_calculate_scaled_capacity()
1235 dev_dbg(di->dev, "Disabling scaled capacity\n"); in ab8500_fg_calculate_scaled_capacity()
1237 capacity = di->bat_cap.prev_percent; in ab8500_fg_calculate_scaled_capacity()
1242 capacity = cs->disable_cap_level; in ab8500_fg_calculate_scaled_capacity()
1247 return capacity; in ab8500_fg_calculate_scaled_capacity()
1251 * ab8500_fg_update_cap_scalers() - Capacity scaling
1255 * the capacity scalers.
1285 * ab8500_fg_check_capacity_limits() - Check if capacity has changed
1287 * @init: capacity is allowed to go up in init mode
1289 * Check if capacity or capacity limit has changed and notify the system
1301 * We do not allow reported capacity level to go up in ab8500_fg_check_capacity_limits()
1320 * If we have received the LOW_BAT IRQ, set capacity to 0 to initiate in ab8500_fg_check_capacity_limits()
1324 dev_dbg(di->dev, "Battery low, set capacity to 0\n"); in ab8500_fg_check_capacity_limits()
1353 "but capacity dropping: %d\n", in ab8500_fg_check_capacity_limits()
1374 * We do not allow reported capacity to go up in ab8500_fg_check_capacity_limits()
1378 "capacity changed from %d to %d (%d)\n", in ab8500_fg_check_capacity_limits()
1387 dev_dbg(di->dev, "capacity not allowed to go up since " in ab8500_fg_check_capacity_limits()
1400 dev_info(di->dev, "capacity=%d (%d)\n", in ab8500_fg_check_capacity_limits()
1442 * Battery capacity calculation state machine for when we're charging
1466 * Read the FG and calculate the new capacity in ab8500_fg_algorithm_charging()
1488 /* Check capacity limits */ in ab8500_fg_algorithm_charging()
1528 dev_dbg(di->dev, "Capacity limits:" in check_sysfs_capacity()
1532 /* If within limits, use the saved capacity and exit estimation...*/ in check_sysfs_capacity()
1538 dev_dbg(di->dev, "Capacity from user out of limits, ignoring"); in check_sysfs_capacity()
1546 * Battery capacity calculation state machine for when we're discharging
1570 * samples to get an initial capacity. in ab8500_fg_algorithm_discharging()
1766 * Entry point for the battery capacity calculation state machine
1812 /* Get an initial capacity calculation */ in ab8500_fg_periodic_work()
2099 * charge_full_design: capacity where battery is considered full
2100 * charge_now: battery capacity in nAh
2101 * capacity: capacity in percent
2102 * capacity_level: capacity level
2114 * batteries is disabled, we always report 100% capacity and in ab8500_fg_get_property()
2115 * capacity level UNKNOWN, since we can't calculate in ab8500_fg_get_property()
2116 * remaining capacity in ab8500_fg_get_property()
2233 /* Save current capacity as maximum */ in ab8500_fg_get_ext_psy_data()
2420 * Used to reset the current battery capacity to be able to
2421 * retrigger a new voltage base capacity calculation. For