Created
November 1, 2022 16:51
-
-
Save andreyv/d6ae8dd2ef98fc665dd1b6c8dc38a013 to your computer and use it in GitHub Desktop.
Battery charge control for Jolla C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEM=="power_supply", KERNEL=="battery", ATTR{capacity}=="[8-9][0-9]|100", ATTR{charging_enabled}=="1", ATTR{charging_enabled}="0" | |
SUBSYSTEM=="power_supply", KERNEL=="battery", ATTR{capacity}=="[0-9]|[1-6][0-9]", ATTR{charging_enabled}=="0", ATTR{charging_enabled}="1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These udev rules stop charging the battery at 80% and resume charging below 70%. | |
However, once charging stops, the battery starts discharging even when connected | |
to a charger. I have not yet found a way to enable trickle charging with the | |
qpnp-linear-charger driver. There seems to be a "qcom,float-charge" Devicetree | |
property, which may or may not be relevant. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment