Searched refs:now_cap (Results 1 – 3 of 3) sorted by relevance
| /rk3399_rockchip-uboot/drivers/power/fuel_gauge/ |
| H A D | fg_rk817.c | 1045 int now_cap = rk817_bat_get_capacity_mah(battery); in is_rk817_bat_last_halt() local 1051 if (now_cap > pre_cap) { in is_rk817_bat_last_halt() 1052 if (abs(now_cap - pre_cap) > (battery->fcc / 10)) { in is_rk817_bat_last_halt() 1098 int now_soc, now_cap, pre_soc, pre_cap; in rk817_bat_not_first_pwron() local 1104 now_cap = rk817_bat_get_capacity_uah(battery) / 1000; in rk817_bat_not_first_pwron() 1110 DBG("now_cap: %d, pre_cap: %d\n", now_cap, pre_cap); in rk817_bat_not_first_pwron() 1112 if ((now_cap > 0) && (now_cap > pre_cap + 10)) { in rk817_bat_not_first_pwron() 1113 if (now_cap >= battery->fcc) in rk817_bat_not_first_pwron() 1114 now_cap = battery->fcc; in rk817_bat_not_first_pwron() 1116 now_soc = now_cap * 1000 * 100 / battery->fcc; in rk817_bat_not_first_pwron() [all …]
|
| H A D | fg_rk818.c | 847 int now_cap = rk818_bat_get_coulomb_cap(di); in is_rk818_bat_last_halt() local 850 if (abs(now_cap - pre_cap) > (di->fcc / 20)) { in is_rk818_bat_last_halt() 860 int pre_soc, pre_cap, ocv_cap = 0, ocv_soc = 0, ocv_vol, now_cap; in rk818_bat_not_first_pwron() local 866 now_cap = rk818_bat_get_coulomb_cap(di); in rk818_bat_not_first_pwron() 869 di->pwr_rsoc = (now_cap + di->fcc / 200) * 100 / DIV(di->fcc); in rk818_bat_not_first_pwron() 876 pre_cap, now_cap); in rk818_bat_not_first_pwron() 877 if (now_cap < 0) in rk818_bat_not_first_pwron() 878 now_cap = 0; in rk818_bat_not_first_pwron() 879 rk818_bat_init_capacity(di, now_cap); in rk818_bat_not_first_pwron() 898 if (now_cap < 0) in rk818_bat_not_first_pwron() [all …]
|
| H A D | fg_rk816.c | 838 int now_cap = rk816_bat_get_coulomb_cap(di); in is_rk816_bat_last_halt() local 841 if (abs(now_cap - pre_cap) > (di->fcc / 20)) { in is_rk816_bat_last_halt() 851 int pre_soc, pre_cap, ocv_cap, ocv_soc, ocv_vol, now_cap; in rk816_bat_not_first_pwron() local 856 now_cap = rk816_bat_get_coulomb_cap(di); in rk816_bat_not_first_pwron() 858 di->pwr_rsoc = (now_cap + di->fcc / 200) * 100 / DIV(di->fcc); in rk816_bat_not_first_pwron() 865 pre_cap, now_cap); in rk816_bat_not_first_pwron() 866 if (now_cap < 0) in rk816_bat_not_first_pwron() 867 now_cap = 0; in rk816_bat_not_first_pwron() 868 rk816_bat_init_capacity(di, now_cap); in rk816_bat_not_first_pwron()
|