Lines Matching full:ocv
94 * @cap_table: capacity table with corresponding ocv
288 int volt, cur, oci, ocv, ret; in sc27xx_fgu_get_boot_capacity() local
317 * Should get the OCV from SC27XX_FGU_POCV register at the system in sc27xx_fgu_get_boot_capacity()
326 ocv = volt * 1000 - oci * data->internal_resist; in sc27xx_fgu_get_boot_capacity()
327 data->boot_volt = ocv; in sc27xx_fgu_get_boot_capacity()
331 * according to current battery's corresponding OCV values. in sc27xx_fgu_get_boot_capacity()
334 ocv); in sc27xx_fgu_get_boot_capacity()
511 /* Return the battery OCV in micro volts. */ in sc27xx_fgu_get_vbat_ocv()
788 int ret, ocv, chg_sts, adc; in sc27xx_fgu_capacity_calibration() local
790 ret = sc27xx_fgu_get_vbat_ocv(data, &ocv); in sc27xx_fgu_capacity_calibration()
792 dev_err(data->dev, "get battery ocv error.\n"); in sc27xx_fgu_capacity_calibration()
809 if ((ocv > data->cap_table[0].ocv && cap < 100) || cap > 100) { in sc27xx_fgu_capacity_calibration()
811 * If current OCV value is larger than the max OCV value in in sc27xx_fgu_capacity_calibration()
812 * OCV table, or the current capacity is larger than 100, in sc27xx_fgu_capacity_calibration()
816 } else if (ocv <= data->cap_table[data->table_len - 1].ocv) { in sc27xx_fgu_capacity_calibration()
818 * If current OCV value is leass than the minimum OCV value in in sc27xx_fgu_capacity_calibration()
819 * OCV table, we should force the inititial capacity to 0. in sc27xx_fgu_capacity_calibration()
822 } else if ((ocv > data->cap_table[data->table_len - 1].ocv && cap <= 0) || in sc27xx_fgu_capacity_calibration()
823 (ocv > data->min_volt && cap <= data->alarm_cap)) { in sc27xx_fgu_capacity_calibration()
825 * If current OCV value is not matchable with current capacity, in sc27xx_fgu_capacity_calibration()
827 * OCV table. in sc27xx_fgu_capacity_calibration()
830 data->table_len, ocv); in sc27xx_fgu_capacity_calibration()
833 } else if (ocv <= data->min_volt) { in sc27xx_fgu_capacity_calibration()
835 * If current OCV value is less than the low alarm voltage, but in sc27xx_fgu_capacity_calibration()
847 * capacity to the capacity corresponding to current OCV in sc27xx_fgu_capacity_calibration()
852 ocv); in sc27xx_fgu_capacity_calibration()
863 data->min_volt = data->cap_table[data->table_len - 1].ocv; in sc27xx_fgu_capacity_calibration()
1010 * For SC27XX fuel gauge device, we only use one ocv-capacity in sc27xx_fgu_hw_init()
1276 int ret, status, ocv; in sc27xx_fgu_suspend() local
1298 ret = sc27xx_fgu_get_vbat_ocv(data, &ocv); in sc27xx_fgu_suspend()
1303 * If current OCV is less than the minimum voltage, we should enable the in sc27xx_fgu_suspend()
1307 if (ocv < data->min_volt) { in sc27xx_fgu_suspend()