Re: [patch] ACPI battery driver emits POWER_SUPPLY_STATUS_FULL when power lead plugged in (resend)

Henrique de Moraes Holschuh
2009-01-30T14:07:06Z

On Wed, 28 Jan 2009, Richard Hughes wrote:
> The attached patch checks the last full and design charge, as this seems
> to work in all cases I have here. In the case of broken batteries or
> broken hardware, we just return UNKNOWN in this "settling" state, which
> is much better for userspace than falling back to full.
>
> With the attached patch userspace gets the right states. In the future,
> maybe we can do some sort of metric over time (watching to see if the
> present charge changes) but for the most part the patch fixes things up
> for userspace.

I am ok with this patch, but it does have *one* corner case.

Brand new good batteries will be reported as full while still charging, when
they're near 100% (they will be above the design capacity).

That isn't enough for me to complain about the patch, and the patch makes it
MUCH better than the current broken behaviour.

So you can have my Acked-by if you want it, for whatever little it is worth.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh