All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: "Rong Zhang" <i@rong.moe>, "Jelle van der Waa" <jelle@vdwaa.nl>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
	Frederik Harwath <frederik@harwath.name>
Subject: Re: [PATCH v3 1/1] platform/x86: add Acer battery control driver
Date: Mon, 11 May 2026 20:53:51 +0200	[thread overview]
Message-ID: <55294e45-ec2d-4506-8836-7fef99dd9698@kernel.org> (raw)
In-Reply-To: <aefaa595ac8566086002e50fafd4194ceab23f01.camel@rong.moe>

Hi Rong,

On 11-May-26 18:09, Rong Zhang wrote:
> Hi Jelle,
> 
> On Sun, 2026-05-10 at 20:50 +0200, Jelle van der Waa wrote:
>> Some Acer laptops can configure battery related features through Acer
>> Care Center on Windows. This driver uses the power supply extension to
>> set a battery charge limit
>>
> 
> What does it limit? If it limits the charge capacity, ...
> 
>>  and exposes the battery

<snip>

> I recently learned that POWER_SUPPLY_CHARGE_TYPE_LONGLIFE is not the
> correct uapi for charge capacity limit. See
> https://lore.kernel.org/r/09d21c9cee8af49fa1d5b568358db0c347668ee9.camel@collabora.com/

As first dicussed here and acked by Sebastian Reichel the
power-supply subsys maintainer using charge_types exposing
standard + long-life is the correct thing to do when there
is a boolean long-life on/off toggle rather then a configurable
stop-charging percentage setting, see:

https://lore.kernel.org/linux-pm/49993a42-aa91-46bf-acef-4a089db4c2db@redhat.com/
https://lore.kernel.org/platform-driver-x86/20241209204051.8786-1-hdegoede@redhat.com/

and also here, which dicusses how upower now also supports
using charge_types for this.

https://vdwaa.nl/charge-types-api-upower.html

I've also replied in the thread.

TL;DR: your original approach to use charge_types in your
patch is correct.

Regards,

Hans



      reply	other threads:[~2026-05-11 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 18:50 [PATCH v3 0/1] platform/x86: add Acer battery control driver Jelle van der Waa
2026-05-10 18:50 ` [PATCH v3 1/1] " Jelle van der Waa
2026-05-11 11:54   ` Ilpo Järvinen
2026-05-11 16:09   ` Rong Zhang
2026-05-11 18:53     ` Hans de Goede [this message]

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=55294e45-ec2d-4506-8836-7fef99dd9698@kernel.org \
    --to=hansg@kernel.org \
    --cc=frederik@harwath.name \
    --cc=i@rong.moe \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jelle@vdwaa.nl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.