linux-mips
[Top] [All Lists]

Advice on battery support [was: Advice on APM-EMU reunion]

To: Paul Mundt <lethal@linux-sh.org>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk, linux-mips@linux-mips.org
Subject: Advice on battery support [was: Advice on APM-EMU reunion]
From: Rodolfo Giometti <giometti@enneenne.com>
Date: Thu, 1 Feb 2007 10:59:04 +0100
In-reply-to: <20070130010055.GA15907@linux-sh.org>
Organization: GNU/Linux Device Drivers, Embedded Systems and Courses
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070129230755.GA8705@enneenne.com> <20070130010055.GA15907@linux-sh.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.13 (2006-08-11)
On Tue, Jan 30, 2007 at 10:00:55AM +0900, Paul Mundt wrote:

> However, it has since been reposted:
> 
> http://article.gmane.org/gmane.linux.kernel/485833
> http://article.gmane.org/gmane.linux.kernel/485834
> http://article.gmane.org/gmane.linux.kernel/485835
> http://article.gmane.org/gmane.linux.kernel/485837
> 
> and merged back in to -mm. This is all post 2.6.20 stuff, though..

Ok, starting from these patches I'd like to add a "battery support" to
the kernel.

What I suppose to do is a new class with a proper methods useful to
collect several info on battery status, such as get_ac_line_status()
get_battery_status(), get_battery_flags(),
get_remaining_battery_life() and so on.

The output will be APM-like into file "/proc/apm" (one line per
battery, or just the "main"/first one?) so that existing applications
continue to work and under sysfs into "/sysfs/class/battery".

Is it sane? :)

Thanks in advance,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                                giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

<Prev in Thread] Current Thread [Next in Thread>