Skip to content

Instantly share code, notes, and snippets.

@andreyv
andreyv / 99-battery.rules
Created Nov 1, 2022
Battery charge control for Jolla C
View 99-battery.rules
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"