mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Umang Jain <uajain@igalia.com>
To: "Rafael J. Wysocki (Intel)" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-dev@igalia.com
Subject: Re: [PATCH v2 1/2] acpi: battery: Query Battery charge time ("_BCT") method
Date: Wed, 14 Oct 2026 19:31:05 +0200	[thread overview]
Message-ID: <497522185b0d5edd0898edab04934d2a@igalia.com> (raw)
In-Reply-To: <CAJZ5v0i0UPcGiiAxNbjUnzn=8D2jcTCo_wtM8aMbOKhqb37EDA@mail.gmail.com>

On 2026-10-12 17:15, Rafael J. Wysocki (Intel) wrote:
> On Wed, Sep 23, 2026 at 10:28 AM Umang Jain <uajain@igalia.com> wrote:
>>
>> Add plumbing for querying the Battery Charge Time ("_BCT") method.
>> If present, set ACPI_BATTERY_BCT_PRESENT in battery flags to denote
>> that the method is supported in ACPI.
>>
>> Signed-off-by: Umang Jain <uajain@igalia.com>
>> ---
>>  drivers/acpi/battery.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
>> index 670853ec3a4d..a1b7a821abaf 100644
>> --- a/drivers/acpi/battery.c
>> +++ b/drivers/acpi/battery.c
>> @@ -76,6 +76,7 @@ MODULE_DEVICE_TABLE(acpi, battery_device_ids);
>>  enum {
>>         ACPI_BATTERY_ALARM_PRESENT,
>>         ACPI_BATTERY_XINFO_PRESENT,
>> +       ACPI_BATTERY_BCT_PRESENT,
>>         ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY,
>>         /* On Lenovo Thinkpad models from 2010 and 2011, the power unit
>>          * switches between mWh and mAh depending on whether the system
>> @@ -110,6 +111,7 @@ struct acpi_battery {
>>
>>         struct mutex property_lock; /* Protects properties below. */
>>         unsigned long update_time;
>> +       unsigned long long charge_time;
> 
> This doesn't need to be unsigned long long.  As per the spec, unsigned
> int should be sufficient.

Last thing before I send out v3, this is the function param-type for the
acpi_evaluate_integer()

In include/acpi/acpi_bus.h, 

acpi_status
acpi_evaluate_integer(acpi_handle handle,
		      acpi_string pathname,
		      struct acpi_object_list *arguments, unsigned long long *data);


Thanks,
Umang

  parent reply	other threads:[~2026-10-14 17:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  8:29 [PATCH v2 0/2] acpi: battery: Query BCT method and steamdeck Umang Jain
2026-09-23  8:29 ` [PATCH v2 1/2] acpi: battery: Query Battery charge time ("_BCT") method Umang Jain
2026-10-12 15:15   ` Rafael J. Wysocki (Intel)
2026-10-13 19:12     ` Umang Jain
2026-10-14 17:31     ` Umang Jain [this message]
2026-10-14 18:11       ` Rafael J. Wysocki (Intel)
2026-09-23  8:29 ` [PATCH v2 2/2] acpi: battery: Handle Valve steamdeck devices quirk Umang Jain
2026-10-12 15:19   ` Rafael J. Wysocki (Intel)
2026-10-10 16:57 ` [PATCH v2 0/2] acpi: battery: Query BCT method and steamdeck Umang Jain

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=497522185b0d5edd0898edab04934d2a@igalia.com \
    --to=uajain@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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

all inboxes | Powered by JetHome®