platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Locke <kevin@kevinlocke.name>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: linux-pm@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [ibm-acpi-devel] [PATCH 0/4] power: supply: add charge_behaviour property (force-discharge, inhibit-charge)
Date: Thu, 25 Nov 2021 11:04:32 -0700	[thread overview]
Message-ID: <YZ/QMNQIe04x/tkF@kevinlocke.name> (raw)
In-Reply-To: <20211123232704.25394-1-linux@weissschuh.net>

On Wed, 2021-11-24 at 00:27 +0100, Thomas Weißschuh wrote:
> this series adds support for the charge_behaviour property to the power
> subsystem and thinkpad_acpi driver.

Wonderful!  Thanks for working on this.

I can confirm inhibit-charge and force-discharge states work with
patch v2 on v5.16-rc2 on a T430 (2342-CTO) with BIOS G1ETC2WW (2.82 ),
EC G1HT36WW and a single battery.  Most behavior is as expected:

- With force-discharge, status becomes "Discharging" and energy_now
  drops over time while AC remains connected.
- With inhibit-charge, status becomes "Unknown" and energy_now is
  stable over time, even when not fully charged.
- With auto, status becomes "Charging" and energy_now rises over time.
- charge_behaviour takes precedence over
  charge_control_{start,end}_threshold: status remains
  Discharging/Unknown when below the start threshold, either due to
  discharge or threshold change.
- charge_behaviour is preserved over soft reboot.
- inhibit-charge/auto are preserved across battery removal and
  reinsertion.
- inhibit-charge/auto are preserved across s2ram (S3).
- With force-discharge, if the battery is removed, the machine
  immediately powers off.

Some behavior is a little surprising:

- charge_behaviour can not be set to force-discharge if AC is
  disconnected (EIO).  If charge_behaviour is force-discharge when AC
  is disconnected, it changes to auto, unlike inhibit-charge.
- charge_behavior force-discharge is not preserved across s2ram (S3),
  unlike inhibit-charge.
- charge_behaviour is not preserved across hard reset (unlike charge
  thresholds).  Interestingly, it appears that inhibit-charge is
  preserved across power-off (no charging is observed while powered
  off) but not power-on, even though it is preserved across soft
  reboot, as noted above.

I assume the behavior is under the control of the EC, so these aren't
criticisms of the patch.  Just some observations.

Tested-by: Kevin Locke <kevin@kevinlocke.name>

Thanks again,
Kevin

  parent reply	other threads:[~2021-11-25 18:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 23:27 [PATCH 0/4] power: supply: add charge_behaviour property (force-discharge, inhibit-charge) Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 1/4] power: supply: add charge_behaviour attributes Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 2/4] power: supply: add helpers for charge_behaviour sysfs Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 3/4] platform/x86: thinkpad_acpi: support force-discharge Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 4/4] platform/x86: thinkpad_acpi: support inhibit-charge Thomas Weißschuh
2021-11-25 18:04 ` Kevin Locke [this message]
2021-12-03 21:33 ` [PATCH 0/4] power: supply: add charge_behaviour property (force-discharge, inhibit-charge) Sebastian Reichel
2021-12-04 13:56   ` Hans de Goede
2021-12-16 15:41   ` Hans de Goede
2021-12-21 16:06   ` Hans de Goede
2021-12-04 16:04 ` Thomas Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YZ/QMNQIe04x/tkF@kevinlocke.name \
    --to=kevin@kevinlocke.name \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).