[PATCH v2 0/4] platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)

Rong Zhang posted 4 patches 1 month, 1 week ago
drivers/platform/x86/lenovo/ideapad-laptop.c | 218 ++++++++++++++-----
1 file changed, 162 insertions(+), 56 deletions(-)
[PATCH v2 0/4] platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)
Posted by Rong Zhang 1 month, 1 week ago
The GBMD/SBMC interface on recent devices supports Rapid Charge mode
(charge_types: Fast) in addition to Conservation Mode (charge_types:
Long_Life).

Query the GBMD interface on probe to determine if a device supports
Rapid Charge. If so, expose these two modes while carefully maintaining
their mutually exclusive state, which aligns with the behavior of
manufacturer utilities on Windows.

Tested on ThinkBook 14 G7+ ASP.

Changes in v2:
- Only expose Rapid Charge on devices that support it (thanks Jelle van
  der Waa)
- Support multiple power_supply_ext definitions to implement the change
  above
- Use str_on_off() helper (thanks Ilpo Järvinen)
- Link to v1: https://lore.kernel.org/r/20251020192443.33088-1-i@rong.moe/

Rong Zhang (4):
  platform/x86: ideapad-laptop: Use str_on_off() helper
  platform/x86: ideapad-laptop: Protect GBMD/SBMC calls with mutex
  platform/x86: ideapad-laptop: Support multiple power_supply_ext
    definitions
  platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)

 drivers/platform/x86/lenovo/ideapad-laptop.c | 218 ++++++++++++++-----
 1 file changed, 162 insertions(+), 56 deletions(-)


base-commit: 1c353dc8d962de652bc7ad2ba2e63f553331391c
-- 
2.51.0

Re: [PATCH v2 0/4] platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)
Posted by Ilpo Järvinen 1 month, 1 week ago
On Thu, 06 Nov 2025 02:28:23 +0800, Rong Zhang wrote:

> The GBMD/SBMC interface on recent devices supports Rapid Charge mode
> (charge_types: Fast) in addition to Conservation Mode (charge_types:
> Long_Life).
> 
> Query the GBMD interface on probe to determine if a device supports
> Rapid Charge. If so, expose these two modes while carefully maintaining
> their mutually exclusive state, which aligns with the behavior of
> manufacturer utilities on Windows.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/4] platform/x86: ideapad-laptop: Use str_on_off() helper
      commit: 06c129cac01be45e458d37534d1a6ba753cf6f13
[2/4] platform/x86: ideapad-laptop: Protect GBMD/SBMC calls with mutex
      commit: 85901a0d8591ecd756078e57be077f12a0ee78be
[3/4] platform/x86: ideapad-laptop: Support multiple power_supply_ext definitions
      commit: 5c54ece0476638f7c5fc655c655e721286a26bf1
[4/4] platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)
      commit: 90430ea98f5585270bc185cee548154d239af8d7

--
 i.