Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329AbZLMNTd (ORCPT ); Sun, 13 Dec 2009 08:19:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753111AbZLMNTc (ORCPT ); Sun, 13 Dec 2009 08:19:32 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:44675 "HELO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753047AbZLMNTb (ORCPT ); Sun, 13 Dec 2009 08:19:31 -0500 Date: Sun, 13 Dec 2009 14:19:22 +0100 From: Pavel Machek To: Linus Walleij Cc: Mark Brown , cbou@mail.ru, dwmw2@infradead.org, LKML , linux-embedded@vger.kernel.org Subject: Re: [POWER] battery calibration parameters from sysfs Message-ID: <20091213131921.GA1437@ucw.cz> References: <20091204104930.GA28625@sirena.org.uk> <20091207114825.GA26965@rakim.wolfsonmicro.main> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 31 > One of the things we're facing is Android, which has > its userspace in plain Java JNI at the end of this link: > http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=s > ervices/jni/com_android_server_BatteryService.cpp;h=8e7cadc6b680fc420d34 > 1faa094c71922946fdab;hb=HEAD > > If you browse down to line 275 you can see it parse the sysfs > attribute "capacity", then this propagates up to the battery > status indicator on *all* Android phones out there. So if > you want to run Android unmodified, this is what you need to > provide. They are effectively using the power sysfs as > their hardware abstraction layer in this case. > > Note: I'm not claiming that Android is doing it right or that > we can't modify this code or so, it's just that this is the way > a few million Android devices out there are actually doing it. Users can't modify them, so they don't count... ...but then there are all the systems that rely on /proc/apm emulation, like openembedded popular on sharp zaurus... 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/