From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757112AbZJJVpW (ORCPT ); Sat, 10 Oct 2009 17:45:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754990AbZJJVpV (ORCPT ); Sat, 10 Oct 2009 17:45:21 -0400 Received: from mail-bw0-f210.google.com ([209.85.218.210]:47773 "EHLO mail-bw0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754794AbZJJVpU convert rfc822-to-8bit (ORCPT ); Sat, 10 Oct 2009 17:45:20 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=cvje2zB9ykME3Vt3hgMFxqCPt/Fk2eIKGodvERLsI1/XsdrYs70MGwQp0/8NRm89jn nwNK1GBGEVKy47atxmeT8QWKGZb8WqjD0Evq4zenBOty8ILts7pEZZiu2ZUbnEuLzhL1 I67mwGJxGmKVQNk+J71BH5Ohn03HNjKs6GUF8= MIME-Version: 1.0 In-Reply-To: <20091010212521.GD14051@elf.ucw.cz> References: <4AC8F02B.6080209@suse.de> <4AC91578.2020807@suse.de> <4AC923F4.9050100@suse.de> <4AC93B45.8090707@suse.de> <20091010120448.GB1811@ucw.cz> <20091010212521.GD14051@elf.ucw.cz> Date: Sat, 10 Oct 2009 23:44:42 +0200 Message-ID: Subject: Re: [PATCH] battery: Fix charge_now returned by broken batteries From: Miguel Ojeda To: Pavel Machek Cc: Alexey Starikovskiy , "Rafael J. Wysocki" , Henrique de Moraes Holschuh , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 10, 2009 at 11:25 PM, Pavel Machek wrote: > Hi! > >> >> 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? > > Well, maybe the battery only updates full_charge_capacity during > powerdown or when the moon is full or something? (IOW you may be > breaking already working machines). > I do not know about batteries as I said, I was waiting for someone to point out how batteries (normally/should) work. >> In any case, my laptop's battery is not charging over 100% its >> original capacity anyway, just reporting a wrong value. > > True. But I do not think  you are fixing it properly. Maybe ask for > fixed BIOS? Well, many BIOS/systems are broken and Linux has to workaround them. I am sure there are a lot of broken batteries out there. > > Or perhaps add quirk based on DMI or something? My battery is easily identified by its model name, so maybe we can apply the workaround only to known hardware. Still, that is a "heavy" solution, as I suppose there are many many battery models in the world. That is why I was asking whether some kind of standard/unified batteries' values/behavior exists (or implement it) that we can try to achieve easily with some heuristics like the one I proposed, instead of some kind of huge table-based workaround system. >                                                                        Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html >