mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maximilian Luz <luzmaximilian@gmail.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: battery: Add "Not Charging" quirk for Microsoft Surface devices
Date: Fri, 6 May 2022 20:47:18 +0200	[thread overview]
Message-ID: <40c3033e-b9d8-0cf6-4009-35701f02c8aa@gmail.com> (raw)
In-Reply-To: <CAJZ5v0hoE0vn5BX586Ag4oLFRn3WoZJCUQZ1+jM1O6Vm+yyc4A@mail.gmail.com>

On 5/6/22 20:43, Rafael J. Wysocki wrote:
> On Fri, Apr 29, 2022 at 7:41 PM Maximilian Luz <luzmaximilian@gmail.com> wrote:
>>
>> Microsoft Surface devices have a limiter that sets a fixed maximum
>> charge capacity for the battery. When that maximum capacity has been
>> reached, charging stops. In that case, _BST returns a battery state
>> field with both "charging" and "discharging" bits cleared. The battery
>> driver, however, returns "unknown" as status.
>>
>> This seems to be the same behavior as observed on the ThinkPads, so
>> let's use the same quirk to handle that.
>>
>> Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
>> ---
>>
>> For what it's worth, I don't think the ACPI spec explicitly states that
>> any of the status bits need to be set, or that there are only the
>> "charging" and "discharging" states. As far as I can tell, ACPI only
>> states:
>>
>>      Notice that the Charging bit and the Discharging bit are mutually
>>      exclusive and must not both be set at the same time. Even in
>>      critical state, hardware should report the corresponding
>>      charging/discharging state.
>>
>> But that does not exclude the case that no bit is set. So, strictly
>> going by spec, I don't think it's necessary to put all of this behind a
>> quirk.
> 
> I think that this should be covered by the patch I've just applied:
> 
> https://patchwork.kernel.org/project/linux-acpi/patch/20220427154053.499203-1-wse@tuxedocomputers.com/
> 
> Shouldn't it?

It does, thank you!

Sorry for having missed that one.

Regards,
Max

      reply	other threads:[~2022-05-06 18:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 17:41 Maximilian Luz
2022-05-06 18:43 ` Rafael J. Wysocki
2022-05-06 18:47   ` Maximilian Luz [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=40c3033e-b9d8-0cf6-4009-35701f02c8aa@gmail.com \
    --to=luzmaximilian@gmail.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®