Skip to content

Instantly share code, notes, and snippets.

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