From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>,
linux-acpi <linux-acpi@vger.kernel.org>, mjg <mjg@redhat.com>,
Matthias Clasen <mclasen@redhat.com>
Subject: Re: ACPI battery driver emits POWER_SUPPLY_STATUS_FULL when power lead plugged in
Date: Sat, 24 Jan 2009 19:37:39 +0300 [thread overview]
Message-ID: <497B43D3.80703@suse.de> (raw)
In-Reply-To: <20090124124158.GC5325@khazad-dum.debian.net>
Henrique de Moraes Holschuh wrote:
> On Sat, 24 Jan 2009, Alexey Starikovskiy wrote:
>> How about such definition: Fully charged == current_capacity >= 90 % of
>> last_capacity && !charging and !discharging?
>
> Not good. It is usual to tell the EC to stop charging at 95% or 98%.
No. You don't understand the idea. EC does not stop charging at 95%, it will treat
battery with 95% of charge as fully charged, it will not *start* charging until charge of the
battery drops below this threshold. This is needed to save limited number of battery recharges until it dies.
So, in other words, if EC does not charge battery, it thinks battery is *full* within some threshold.
Now we talk about sub-second interval, then EC makes a decision to charge or not the battery,
and what to report in this sub-second interval. I am trying to apply same logic as EC does --
if it is above some threshold (90, 95, 98 %%) of last_capacity, report it full.
>
> I don't understand, why this guesswork over fully charged? If you cannot
> detect fully charged, then *don't*.
>
> But if you must sinthesize it, and you can get an up-to-date "last full
> capacity" from the battery when comparing, I suggest:
>
> full = (current capacity == last full capacity) && !charging &&
> !discharging
certainly, 90% is wrong, but 100% makes a day...
>
> That would *still* be wrong in a few corner cases, but at least they're rare
> corner cases that happens only when the pack recalibrates its fuel gauge.
full in this case is not exact term. As any other term beside current_now and voltage_now.
Capacity of the battery is estimated, so any number that was depending on it, is estimated too.
> If there isn't a reliable way to detect the "full" state, just drop the
> fully charged detection altogether.
People are used to see "full" state of the battery. I think we could tolerate not-full-enough
for sub-second interval instead of dropping full state altogether.
Regards,
Alex.
next prev parent reply other threads:[~2009-01-24 16:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 16:57 ACPI battery driver emits POWER_SUPPLY_STATUS_FULL when power lead plugged in Richard Hughes
2009-01-23 19:00 ` Alexey Starikovskiy
2009-01-23 22:02 ` Henrique de Moraes Holschuh
2009-01-23 23:39 ` Richard Hughes
2009-01-24 0:14 ` Alexey Starikovskiy
2009-01-24 12:41 ` Henrique de Moraes Holschuh
2009-01-24 16:37 ` Alexey Starikovskiy [this message]
2009-01-25 10:28 ` [patch] " Richard Hughes
2009-01-25 10:55 ` Alexey Starikovskiy
2009-01-25 13:42 ` Henrique de Moraes Holschuh
2009-01-25 15:13 ` Richard Hughes
2009-01-25 19:50 ` Alexey Starikovskiy
2009-01-26 8:43 ` Richard Hughes
2009-01-28 13:20 ` [patch] ACPI battery driver emits POWER_SUPPLY_STATUS_FULL when power lead plugged in (resend) Richard Hughes
2009-01-30 14:07 ` Henrique de Moraes Holschuh
2009-02-08 3:59 ` Len Brown
2009-02-08 10:08 ` Richard Hughes
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=497B43D3.80703@suse.de \
--to=astarikovskiy@suse.de \
--cc=hmh@hmh.eng.br \
--cc=hughsient@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=mclasen@redhat.com \
--cc=mjg@redhat.com \
/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