@ChromiumOS-Guy said in Guide to charge limiting your Fairphone 5:
on FP5 it seems to draw the same amount if I set it to a large value then if I restart
well, my main concern is what could happen for people following your advice with a more powerful (fast) charger.
If I understand correctly, the kernel limits to 6 amperes whatever, from kernel-fairphone-qcm6490/drivers/power/supply/qti_battery_charger.c;
#ifdef CHARGE_MODE_FCC_SUPPORT
#define SLOW_MODE_FCC 1000000 // 2A
#define NORMAL_MODE_FCC 6000000 // 6A
static int battery_psy_set_charge_current_by_chgmode(struct battery_chg_dev *bcdev, int val)
{
int rc = 0;
u32 fcc_ua = ((val == SLOW_MODE_FCC) ? SLOW_MODE_FCC : NORMAL_MODE_FCC);
rc = write_property_id(bcdev, &bcdev->psy_list[PSY_TYPE_BATTERY], BATT_CHGMODE_FCC, fcc_ua);
I don't know if the FP5 battery can support 6 amps without problems.
If I would use your system, I'd try to keep safe and set user_fcc to 1000000 (notice how the comment seems wrong, how can 1000000 mean 2 amp and 6000000 6 amp ?)
Re: different kernels, well, if I understand correctly, if the battery driver supports it, you'll find the appropriate values in the /sys/class/power_supply/ that are referred everywhere on the web: charge_control_start_threshold and charge_control_end_threshold, there should be no need for a script that will wake up the Cpu every minute (hardly a good thing to save power).
It don't concern FP5 (although the kernel is recent enough... I wonder if the kernel in Android 14 has a more recent driver that supports this feature or if there is some script to support it, but what's sure is that control up to 80% charge is supported on Android and FP5).