Lines Matching full:capacity

82  * @total_cap: the total capacity of the battery in mAh
83 * @init_cap: the initial capacity of the battery in mAh
84 * @alarm_cap: the alarm capacity
89 * @table_len: the capacity table length
94 * @cap_table: capacity table with corresponding ocv
124 static int sc27xx_fgu_cap_to_clbcnt(struct sc27xx_fgu_data *data, int capacity);
162 * We use low 4 bits to save the last battery capacity and high 12 bits in sc27xx_fgu_is_first_poweron()
281 * When system boots on, we can not read battery capacity from coulomb
284 * capacity according to the capacity table.
293 * battery capacity as the initial battery capacity. Otherwise we should in sc27xx_fgu_get_boot_capacity()
294 * re-calculate the initial battery capacity. in sc27xx_fgu_get_boot_capacity()
330 * Parse the capacity table to look up the correct capacity percent in sc27xx_fgu_get_boot_capacity()
435 * Convert coulomb counter to delta capacity (mAh), and set multiplier in sc27xx_fgu_get_capacity()
442 * Convert to capacity percent of the battery total capacity, in sc27xx_fgu_get_capacity()
448 /* Calibrate the battery capacity in a normal range. */ in sc27xx_fgu_get_capacity()
714 dev_err(data->dev, "failed to save battery capacity\n"); in sc27xx_fgu_set_property()
811 * lower capacity. in sc27xx_fgu_capacity_calibration()
819 * OCV table, or the current capacity is larger than 100, in sc27xx_fgu_capacity_calibration()
820 * we should force the inititial capacity to 100. in sc27xx_fgu_capacity_calibration()
826 * OCV table, we should force the inititial capacity to 0. in sc27xx_fgu_capacity_calibration()
832 * If current OCV value is not matchable with current capacity, in sc27xx_fgu_capacity_calibration()
833 * we should re-calculate current capacity by looking up the in sc27xx_fgu_capacity_calibration()
843 * current capacity is larger than the alarm capacity, we should in sc27xx_fgu_capacity_calibration()
844 * adjust the inititial capacity to alarm capacity. in sc27xx_fgu_capacity_calibration()
852 * If current capacity is equal with 0 or less than 0 in sc27xx_fgu_capacity_calibration()
854 * capacity to the capacity corresponding to current OCV in sc27xx_fgu_capacity_calibration()
867 * After adjusting the battery capacity, we should set the in sc27xx_fgu_capacity_calibration()
902 * battery capacity in lower voltage stage. in sc27xx_fgu_interrupt()
950 static int sc27xx_fgu_cap_to_clbcnt(struct sc27xx_fgu_data *data, int capacity) in sc27xx_fgu_cap_to_clbcnt() argument
953 * Get current capacity (mAh) = battery total capacity (mAh) * in sc27xx_fgu_cap_to_clbcnt()
954 * current capacity percent (capacity / 100). in sc27xx_fgu_cap_to_clbcnt()
956 int cur_cap = DIV_ROUND_CLOSEST(data->total_cap * capacity, 100); in sc27xx_fgu_cap_to_clbcnt()
959 * Convert current capacity (mAh) to coulomb counter according to the in sc27xx_fgu_cap_to_clbcnt()
1017 * For SC27XX fuel gauge device, we only use one ocv-capacity in sc27xx_fgu_hw_init()
1096 * capacity. Now we set the delta threshold as a counter value of 1% in sc27xx_fgu_hw_init()
1097 * capacity. in sc27xx_fgu_hw_init()
1117 * Get the boot battery capacity when system powers on, which is used to in sc27xx_fgu_hw_init()
1119 * counter to measure the battery capacity. in sc27xx_fgu_hw_init()
1123 dev_err(data->dev, "failed to get boot capacity\n"); in sc27xx_fgu_hw_init()
1128 * Convert battery capacity to the corresponding initial coulomb counter in sc27xx_fgu_hw_init()
1291 * adjust the battery capacity. in sc27xx_fgu_suspend()
1312 * battery capacity. in sc27xx_fgu_suspend()