All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Pearson <markpearson@lenovo.com>
To: "Ognjen Galić" <ognjen.galic@outlook.com>,
	"Thomas Koch" <linrunner@gmx.net>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Nicolo' Piazzalunga" <nicolopiazzalunga@gmail.com>,
	platform-driver-x86@vger.kernel.org,
	"Nitin Joshi1" <njoshi1@lenovo.com>,
	"Sebastian Reichel" <sre@kernel.org>
Cc: <smclt30p@gmail.com>
Subject: Re: [External] Re: [PATCH 1/3] thinkpad_acpi: add support for force_discharge
Date: Mon, 12 Apr 2021 13:10:35 -0400	[thread overview]
Message-ID: <a194b7e1-d812-5c63-373c-db11080d5e1d@lenovo.com> (raw)
In-Reply-To: <VI1PR09MB2302B7C3AD8014CC98D36AA595759@VI1PR09MB2302.eurprd09.prod.outlook.com>


On 07/04/2021 15:01, Ognjen Galić wrote:
> 
> On 07/04/2021 19:48, Mark Pearson wrote:
>> Hi Thomas, Hans and Nicolo
>>
>> On 07/04/2021 08:19, Thomas Koch wrote:
>>> Hi Hans,
>>>
>>>> 1. These features are useful, but not super useful and as such I wonder
>>>> how often they are used and this how well tested the firmware is wrt
>>>> these.
>>>> I have added Mark and Nitin from Lenovo to the Cc. Mark, Nitin, can you
>>>> comment on if it is ok from a firmware pov to try and use the following
>>>> battery related ACPI methods on all thinkpads? :
>>>> #define GET_DISCHARGE    "BDSG"
>>>> #define SET_DISCHARGE    "BDSS"
>>>> #define GET_INHIBIT    "PSSG"
>>>> #define SET_INHIBIT    "BICS"
>>> These ACPI methods are present in (with very few exceptions) all
>>> ThinkPads released since 2012. I am curious to hear what Mark and Nitin
>>> have to say, never read anything official about it.
>> I'm afraid I've not come across these myself before, but will go and ask
>> the firmware team.
>> <For my internal reference LO-1115>
> 
> I received the documents a few years back directly from a Chinese
> contact with all the methods
> and parameters described. I can mail the document to you privately if
> that's needed.
> 
>> It would be good to confirm the implementation details if I can. I found
>> recently that some of the temperature sensors that are read in by
>> thinkpad_acpi from the EC RAM are not temp sensors (patch coming
>> soon....hopefully later today). Hopefully I can check the internal spec
>> and give a thumbs up on the implementation - even if we're not allowed
>> to share the actual paperwork (maybe one day....)
>>
>>> Since 2012 there is also userspace tool tpacpi-bat [1] employing them
>>> along with those for the start/stop threshold.
>>>
>>> My own tool TLP makes use of tpacpi-bat for force_discharge also since
>>> 2012. From my experience in TLP support i can say there's a significant
>>> user base and those who use thresholds also want to use force_discharge
>>> for recalibration from time to time.
>> This probably isn't the right place for the discussion, but I've been
>> meaning to dig into battery management but never really get the time. I
>> know in the windows world that ThinkVantage has extra hooks for setting
>> thresholds and I wanted to see what we can do on the Linux side. If
>> there is anything that would be particularly helpful that is missing
>> please let me know.
>>
>> Thanks
>> Mark
>>
>>>
>>> The patches at hand work flawlessly on my small ThinkPad collection.
>>> [1] https://github.com/teleshoes/tpacpi-bat
>>>
Just as a follow-up - I got some more details on the four ACPI methods
from the firmware team and it all matches up with the code (and indeed
the implementation in tpcacpi-bat).

Mark

  parent reply	other threads:[~2021-04-12 17:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 14:01 [PATCH 1/3] thinkpad_acpi: add support for force_discharge Nicolo' Piazzalunga
2021-04-07 10:24 ` Hans de Goede
2021-04-07 10:33   ` Barnabás Pőcze
2021-04-08 13:51     ` Sebastian Reichel
2021-04-08 18:18       ` Thomas Koch
2021-04-09 18:33       ` Thomas Koch
2021-04-13  8:05         ` Hans de Goede
2021-04-17 11:49           ` Thomas Koch
2021-04-17 17:03             ` Hans de Goede
2021-05-19 14:45               ` Nicolo' Piazzalunga
2021-04-07 12:19   ` Thomas Koch
2021-04-07 17:48     ` [External] " Mark Pearson
     [not found]       ` <VI1PR09MB2302B7C3AD8014CC98D36AA595759@VI1PR09MB2302.eurprd09.prod.outlook.com>
2021-04-12 17:10         ` Mark Pearson [this message]
2021-09-27 13:59   ` Mark Pearson
2021-09-27 15:00     ` Nicolò Piazzalunga
2021-09-27 15:12       ` Hans de Goede
2021-09-27 16:50         ` [External] " Mark Pearson
2021-09-29  5:47         ` Thomas Koch
2021-09-29  9:55           ` Hans de Goede
2021-09-29 10:45             ` Thomas Koch
2021-09-29 10:56               ` Hans de Goede
2021-09-29 13:45                 ` [External] " Mark Pearson

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=a194b7e1-d812-5c63-373c-db11080d5e1d@lenovo.com \
    --to=markpearson@lenovo.com \
    --cc=hdegoede@redhat.com \
    --cc=linrunner@gmx.net \
    --cc=nicolopiazzalunga@gmail.com \
    --cc=njoshi1@lenovo.com \
    --cc=ognjen.galic@outlook.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=smclt30p@gmail.com \
    --cc=sre@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.