mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/x86: ideapad-laptop: Fix unexpected charge_types on probe
@ 2026-10-17 23:16 Rong Zhang
  2026-10-17 23:16 ` [PATCH 1/2] platform/x86: ideapad-laptop: Factor out charge_types methods for internal use Rong Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rong Zhang @ 2026-10-17 23:16 UTC (permalink / raw)
  To: Ike Panhc, Mark Pearson, Derek J. Clark, Hans de Goede,
	Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, stable, Rong Zhang

It was reported [1] that some unfortunate combinations of BIOS and
Lenovo utilities (e.g., Legion Go 2 + Legion Space) may enable Rapid
Charge and Conservation Mode at the same time, which is very out of
sepc.

If both are enabled during a previous Windows boot, ideapad-laptop will
see both bits set and correctly shout "unexpected charge_types".

A planned BIOS update will address this. Before that, if unexpected
charge_types are encountered on probe, enforce [Long_Life] to prevent
the device from operating in an out-of-spec state. On check or fix
failure, skip registering the battery hook and the conservation_mode
attribute.

Note: the switches never enable themselves autonomously, so there is no
need to fix it during runtime.

Fixes: 90430ea98f55 ("platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)")
Closes: https://github.com/ValveSoftware/SteamOS/issues/2876 [1]
Signed-off-by: Rong Zhang <i@rong.moe>
---
Rong Zhang (2):
      platform/x86: ideapad-laptop: Factor out charge_types methods for internal use
      platform/x86: ideapad-laptop: Fix unexpected charge_types on probe

 drivers/platform/x86/lenovo/ideapad-laptop.c | 113 ++++++++++++++++++++-------
 1 file changed, 84 insertions(+), 29 deletions(-)
---
base-commit: 58161ead29e50d70a317ea26b472e0c7508e69da
change-id: ef28eda4-ideapad-fix-charge-types-067d46d08945

Thanks,
Rong


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-19  1:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-17 23:16 [PATCH 0/2] platform/x86: ideapad-laptop: Fix unexpected charge_types on probe Rong Zhang
2026-10-17 23:16 ` [PATCH 1/2] platform/x86: ideapad-laptop: Factor out charge_types methods for internal use Rong Zhang
2026-10-17 23:16 ` [PATCH 2/2] platform/x86: ideapad-laptop: Fix unexpected charge_types on probe Rong Zhang
2026-10-18  5:30 ` [PATCH 0/2] " Derek J. Clark
2026-10-18 14:19   ` Rong Zhang
2026-10-19  1:17     ` Derek J. Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®