lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 10 Oct 2009 22:53:39 +0200
From:	Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:	Pavel Machek <pavel@....cz>
Cc:	Alexey Starikovskiy <astarikovskiy@...e.de>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] battery: Fix charge_now returned by broken batteries

On Sat, Oct 10, 2009 at 2:04 PM, Pavel Machek <pavel@....cz> wrote:
> Hi!
>
>> > current full charge, when the charging is complete. It may end up lower or
>> > greater than
>> > previous value.
>> > Comparing current charge with the last full charge may correctly give you
>> >>100%.
>>
>> Then maybe we can write something like...
>>
>> val->intval = acpi_battery_is_charged(battery)
>>       ? min(battery->capacity_now, battery->full_charge_capacity) * 1000
>>       : battery->capacity_now * 1000;
>>
>> So we only use the min() operation when it is fully charged (returning
>> to 100%) without losing information when charging.
>>
>> The problem is that percentage may jump from >100% to 100% in
>> batteries whose full capacity increase, but I think that is OK, since
>> when completely charged, the >100% is the new 100%.
>>
>> In "broken" batteries (is it broken finally? or is it expected
>> behaviour?) like mine the old problem will be corrected, as it was
>> only present in the charged state.
>
> I believe you better work around this in userspace... or agree that
>>100% charge is possible.

I agree that >100% charge is possible while charging (because that
would mean the battery is over the last charged level); however, what
does it mean when charged?

In any case, my laptop's battery is not charging over 100% its
original capacity anyway, just reporting a wrong value.

>
>                                                                Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ