Currently we have an option to set the battery charge limit in BIOS. However, that setting is not propagated to the kernel and thus is not visible to the userspace.
For example my KDE battery applet still shows the battery as charging even when upper limit is reached. Also, it incorrectly calculates the battery wear.
I suppose this happens because kernel does not provide the information in sysfs:
+++ Battery Status: BAT1
/sys/class/power_supply/BAT1/manufacturer = NVT
/sys/class/power_supply/BAT1/model_name = Framewo
/sys/class/power_supply/BAT1/cycle_count = 126
/sys/class/power_supply/BAT1/charge_full_design = 3572 [mAh]
/sys/class/power_supply/BAT1/charge_full = 3208 [mAh]
/sys/class/power_supply/BAT1/charge_now = 2304 [mAh]
/sys/class/power_supply/BAT1/current_now = 346 [mA]
/sys/class/power_supply/BAT1/status = Discharging
/sys/class/power_supply/BAT1/charge_control_start_threshold = (not available)
/sys/class/power_supply/BAT1/charge_control_end_threshold = (not available)
Charge = 71.8 [%]
Capacity = 89.8 [%]
Note the missing thresholds and charge limit (90%) mistakenly treated as actual capacity.
Any ideas on what needs to be done to support that in the kernel? My understanding is thath it could be supported, since overall battery info is detected and is more or less accurate.