All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Luis Miguel Arias <luismiguel@godjango.dev>
Cc: corentin.chary@gmail.com, luke@ljones.dev,
	denis.benato@linux.dev,  Hans de Goede <hansg@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: asus-wmi: restore battery charge limit support
Date: Thu, 17 Sep 2026 17:01:55 +0300 (EEST)	[thread overview]
Message-ID: <568d06ad-1e2a-34c7-614f-4ee4432e5cc5@linux.intel.com> (raw)
In-Reply-To: <20260818175814.65757-1-luismiguel@godjango.dev>

On Tue, 18 Aug 2026, Luis Miguel Arias wrote:

> On ASUS systems where the charge threshold is supported through
> ASUS_WMI_DEVID_RSOC, initializing charge_end_threshold to -1 causes
> the sysfs attribute to return -ENODATA. This makes TLP consider
> charge threshold support unavailable.
> 
> Initialize the cached threshold to 100 instead, allowing userspace
> to set the desired threshold normally.
> 
> Tested on ASUS with TLP 1.8.0:
> 
> Before this change:
> * charge_end_threshold = -1
> * TLP reported no charge threshold support
> 
> After this change:
> * TLP reports "charge threshold" as supported
> * natacpi (asus_wmi) is active
> * charge_control_end_threshold can be set to 80%
> 
> Signed-off-by: Luis Miguel Arias <luismiguel@godjango.dev>
> ---
>  drivers/platform/x86/asus-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 80144c412..87363b198 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -1586,7 +1586,7 @@ static int asus_wmi_battery_add(struct power_supply *battery, struct acpi_batter
>  	 * platforms retains it, therefore signal the threshold as unknown
>  	 * until user explicitly sets it to a new value.
>  	 */
> -	charge_end_threshold = -1;
> +	charge_end_threshold = 100;

Thank you for the submission but is is already covered by the commit 
78bf392ba77d ("platform/x86: asus-wmi: temporarily revert to setting a 
charge limit").

-- 
 i.


  reply	other threads:[~2026-09-17 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 17:58 [PATCH] platform/x86: asus-wmi: restore battery charge limit support Luis Miguel Arias
2026-09-17 14:01 ` Ilpo Järvinen [this message]
     [not found] <20260818174850.51457-1-luismi@gdcore.dev>
2026-08-18 18:09 ` Denis Benato

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=568d06ad-1e2a-34c7-614f-4ee4432e5cc5@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=corentin.chary@gmail.com \
    --cc=denis.benato@linux.dev \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luismiguel@godjango.dev \
    --cc=luke@ljones.dev \
    --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.