rules: 60-upower-battery: charge threshold is supported when start or end threshold is present

Add CHARGE_LIMIT support for systems only providing
charge_control_end_threshold. This allows UPower to configure charge
thresholds when the specific sysfs property is present.

Related: https://gitlab.freedesktop.org/upower/upower/-/merge_requests/308
Resolves: https://gitlab.freedesktop.org/upower/upower/-/issues/342

Signed-off-by: Kate Hsuan <hpa@redhat.com>
This commit is contained in:
Kate Hsuan 2026-03-23 16:51:38 +08:00
parent d75f2dbee4
commit 20a844b41e

View file

@ -4,4 +4,8 @@ SUBSYSTEM=="power_supply", ATTR{charge_control_start_threshold}!="", \
IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \
GOTO="battery_end"
SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}!="", \
IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \
GOTO="battery_end"
LABEL="battery_end"