Searched refs:now_cap (Results 1 – 6 of 6) sorted by relevance
| /OK3568_Linux_fs/u-boot/drivers/power/fuel_gauge/ |
| H A D | fg_rk817.c | 740 int now_cap = rk817_bat_get_capacity_mah(battery); in is_rk817_bat_last_halt() local 746 if (now_cap > pre_cap) { in is_rk817_bat_last_halt() 747 if (abs(now_cap - pre_cap) > (battery->fcc / 10)) { in is_rk817_bat_last_halt() 784 int now_soc, now_cap, pre_soc, pre_cap; in rk817_bat_not_first_pwron() local 790 now_cap = rk817_bat_get_capacity_mah(battery); in rk817_bat_not_first_pwron() 797 DBG("now_cap: %d, pre_cap: %d\n", now_cap, pre_cap); in rk817_bat_not_first_pwron() 799 if (now_cap > pre_cap) { in rk817_bat_not_first_pwron() 800 if (now_cap >= battery->fcc) in rk817_bat_not_first_pwron() 801 now_cap = battery->fcc; in rk817_bat_not_first_pwron() 803 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()
|
| /OK3568_Linux_fs/kernel/drivers/power/supply/ |
| H A D | rk817_battery.c | 1500 int now_cap = rk817_bat_get_capacity_mah(battery); in is_rk817_bat_last_halt() local 1503 if (abs(now_cap - pre_cap) > (battery->fcc / 10)) { in is_rk817_bat_last_halt() 1612 int now_cap, pre_soc, pre_cap, ocv_cap, ocv_soc, ocv_vol; in rk817_bat_not_first_pwron() local 1617 now_cap = rk817_bat_get_capacity_mah(battery); in rk817_bat_not_first_pwron() 1626 pre_cap, now_cap); in rk817_bat_not_first_pwron() 1627 if (now_cap < 0) in rk817_bat_not_first_pwron() 1628 now_cap = 0; in rk817_bat_not_first_pwron() 1629 rk817_bat_init_coulomb_cap(battery, now_cap); in rk817_bat_not_first_pwron() 1630 pre_cap = now_cap; in rk817_bat_not_first_pwron()
|
| H A D | rk818_battery.c | 1247 int now_cap = rk818_bat_get_coulomb_cap(di); in is_rk818_bat_last_halt() local 1250 if (abs(now_cap - pre_cap) > (di->fcc / 10)) { in is_rk818_bat_last_halt() 1276 int now_cap, pre_soc, pre_cap, ocv_cap, ocv_soc, ocv_vol; in rk818_bat_not_first_pwron() local 1281 now_cap = rk818_bat_get_coulomb_cap(di); in rk818_bat_not_first_pwron() 1292 pre_cap, now_cap); in rk818_bat_not_first_pwron() 1293 if (now_cap < 0) in rk818_bat_not_first_pwron() 1294 now_cap = 0; in rk818_bat_not_first_pwron() 1295 rk818_bat_init_coulomb_cap(di, now_cap); in rk818_bat_not_first_pwron() 1296 pre_cap = now_cap; in rk818_bat_not_first_pwron()
|
| H A D | rk816_battery.c | 1937 int now_cap = rk816_bat_get_coulomb_cap(di); in is_rk816_bat_last_halt() local 1940 if (abs(now_cap - pre_cap) > (di->fcc / 10)) { in is_rk816_bat_last_halt() 1966 int now_cap, pre_soc, pre_cap, ocv_cap, ocv_soc, ocv_vol; in rk816_bat_not_first_pwron() local 1971 now_cap = rk816_bat_get_coulomb_cap(di); in rk816_bat_not_first_pwron() 1982 pre_cap, now_cap); in rk816_bat_not_first_pwron() 1983 if (now_cap < 0) in rk816_bat_not_first_pwron() 1984 now_cap = 0; in rk816_bat_not_first_pwron() 1985 rk816_bat_init_coulomb_cap(di, now_cap); in rk816_bat_not_first_pwron() 1986 pre_cap = now_cap; in rk816_bat_not_first_pwron()
|