From 20a844b41edeba33bd9d8096d340799eec7f511d Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Mon, 23 Mar 2026 16:51:38 +0800 Subject: [PATCH] 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 --- rules/60-upower-battery.rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rules/60-upower-battery.rules b/rules/60-upower-battery.rules index 3640048..f81687e 100644 --- a/rules/60-upower-battery.rules +++ b/rules/60-upower-battery.rules @@ -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"