From 97d2ea6197f81ec982ad2210c3a159dd9b6793df Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Mon, 17 Nov 2025 14:08:45 +0800 Subject: [PATCH] bus: org.freedesktop.UPower.Device: introduce ChargeStrategies to select the charging algorithm This property and API are used to show the current charging strategy reported by the system firmware and set the strategy to the firmware. This gives the upper-layer apps and the user can choose a charging algorithm. --- dbus/org.freedesktop.UPower.Device.xml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/dbus/org.freedesktop.UPower.Device.xml b/dbus/org.freedesktop.UPower.Device.xml index e99bb32..fed392b 100644 --- a/dbus/org.freedesktop.UPower.Device.xml +++ b/dbus/org.freedesktop.UPower.Device.xml @@ -914,6 +914,44 @@ method return sender=:1.386 -> dest=:1.477 reply_serial=2 + + + + Select the charging algorithm to use for a battery. + + + 1Unknown. The battery charging behavior is unknown or not supported. + + + 2N/A. The battery charging behavior is not supported. + + + 4Trickle. The battery charges slowly. + + + 8Fast. Quickly charge the battery using fast-charge technology + + + 16Standard. Fully charge the battery with a moderate rate. + + + 32Adaptive. The battery charges at a rate that adapts to the battery's capacity which the system firmware controls. + + + 64Custom. The battery charges at a rate that is set by the user. + + + 128Long-life. The charger reduces its charging rate in order to prolong the battery health + + + 256Bypass. Bypass the charge path around the integrated charger. A external charger is used instead to manage the charging + + + Examples: + If the system supports charge start threshold and charge end threshold, the value is 3. If the system supports charge end threshold and the battery charging behavior is controlled by the system firmware, the value is 6. + + +