linux-mips
[Top] [All Lists]

Re: Battery status

To: Clark Williams <williams@redhat.com>
Subject: Re: Battery status
From: Rodolfo Giometti <giometti@linux.it>
Date: Fri, 22 Jul 2005 17:34:53 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <1122045924.10743.16.camel@riff>
Organization: Programmi e soluzioni GNU/Linux
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20050722142205.GE21044@enneenne.com> <1122044036.10743.5.camel@riff> <20050722151402.GG21044@enneenne.com> <1122045924.10743.16.camel@riff>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.6+20040722i
On Fri, Jul 22, 2005 at 10:25:24AM -0500, Clark Williams wrote:
> /me goes and actually *looks* at the acpi driver(s)

Ok. I see! :)

> I would recommend writing a completely separate driver that just
> provides the hook(s) to get to battery and any other info you want to
> provide. I did it on another platform (can't seem to find that code
> though) mainly to use the /proc/acpi/event interface and receive button
> presses and things like that. Something like a fake-acpi.c that various
> platform folks could use to translate their events into the acpi
> interface. 

Yes, just file «arch/arm/kernel/apm.c» does regarding APM.

> That's kinda hokey now that I actually wrote it down and looked at it.
> Maybe what we need to do is put together a framework somewhat like the
> way acpi presents state information, but not called acpi (wouldn't want
> someone thinking that we'd ported the acpi interpreter to MIPS :). I'm
> not even sure if it should go into /proc or /sys. 
> 
> I just liked the fact that the event interface and the status interfaces
> were presented in somewhat logical fashion to user space, such that a
> shell script could be used to gather information or manipulate the state
> (e.g. 'echo 3 >/proc/acpi/sleep' to suspend to RAM). 

Yes.

> Gah. Sorry, you were asking for an answer and I turned this into a
> design discussion. My opinion: if you're in a hurry, write a simple

Nonono. It's very interesting what you are saying!

> driver that presents a /proc interface to get to battery information. 

Ok. Currently I have some time to spend on it... do you have any
suggestions about I can start developing it in the good way? :)

Thanks a lot,

Rodolfo

-- 

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

Attachment: signature.asc
Description: Digital signature

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