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()
804 * lower capacity. in sc27xx_fgu_capacity_calibration()
812 * OCV table, or the current capacity is larger than 100, in sc27xx_fgu_capacity_calibration()
813 * we should force the inititial capacity to 100. in sc27xx_fgu_capacity_calibration()
819 * OCV table, we should force the inititial capacity to 0. in sc27xx_fgu_capacity_calibration()
825 * If current OCV value is not matchable with current capacity, in sc27xx_fgu_capacity_calibration()
826 * we should re-calculate current capacity by looking up the in sc27xx_fgu_capacity_calibration()
836 * current capacity is larger than the alarm capacity, we should in sc27xx_fgu_capacity_calibration()
837 * adjust the inititial capacity to alarm capacity. in sc27xx_fgu_capacity_calibration()
845 * If current capacity is equal with 0 or less than 0 in sc27xx_fgu_capacity_calibration()
847 * capacity to the capacity corresponding to current OCV in sc27xx_fgu_capacity_calibration()
860 * After adjusting the battery capacity, we should set the in sc27xx_fgu_capacity_calibration()
895 * battery capacity in lower voltage stage. in sc27xx_fgu_interrupt()
943 static int sc27xx_fgu_cap_to_clbcnt(struct sc27xx_fgu_data *data, int capacity) in sc27xx_fgu_cap_to_clbcnt() argument
946 * Get current capacity (mAh) = battery total capacity (mAh) * in sc27xx_fgu_cap_to_clbcnt()
947 * current capacity percent (capacity / 100). in sc27xx_fgu_cap_to_clbcnt()
949 int cur_cap = DIV_ROUND_CLOSEST(data->total_cap * capacity, 100); in sc27xx_fgu_cap_to_clbcnt()
952 * Convert current capacity (mAh) to coulomb counter according to the in sc27xx_fgu_cap_to_clbcnt()
1010 * For SC27XX fuel gauge device, we only use one ocv-capacity in sc27xx_fgu_hw_init()
1089 * capacity. Now we set the delta threshold as a counter value of 1% in sc27xx_fgu_hw_init()
1090 * capacity. in sc27xx_fgu_hw_init()
1110 * Get the boot battery capacity when system powers on, which is used to in sc27xx_fgu_hw_init()
1112 * counter to measure the battery capacity. in sc27xx_fgu_hw_init()
1116 dev_err(data->dev, "failed to get boot capacity\n"); in sc27xx_fgu_hw_init()
1121 * Convert battery capacity to the corresponding initial coulomb counter in sc27xx_fgu_hw_init()
1284 * adjust the battery capacity. in sc27xx_fgu_suspend()
1305 * battery capacity. in sc27xx_fgu_suspend()