Thread (1 message) 1 message, 1 author, 2005-01-04

Re: Re: first shoot for smartbattery

From: Pedro Venda <hidden>
Date: 2005-01-04 15:24:41

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Ducrot wrote:
| On Mon, Jan 03, 2005 at 07:50:13PM +0000, Pedro Venda wrote:
|
|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>Bruno Ducrot wrote:
|>| On Mon, Jan 03, 2005 at 05:35:13PM +0000, Pedro Venda wrote:
|>|
|>|>-----BEGIN PGP SIGNED MESSAGE-----
|>|>Hash: SHA1
|>|>
|>|>Pedro Venda wrote:
|>|>| Bruno Ducrot wrote:
|>|>|
|>|>| | I think I found was wrong.  Please refetch, or (at your option)
|>replace
|>|>| | i2c-acpi-ec.ec with
|>|>| |
|>|>|
|>http://www.poupinou.org/acpi/smartbatt/smartbatt/i2c-acpi-ec/i2c-acpi-ec.c
|>|>| | then redo the sh compile.sh
|>|>| | Sorry, it was a stupid bug(tm) requiring that I buy a brown bag...
|>|>|
|>|>| happens to everyone.
|>|>|
|>|>| | Something wrong also with rmmod i2c-acpi-ec :( so you have to reboot
|>in
|>|>| | order to be able to 'insmod i2c-acpi-ec.ko' again (I'm sure the brown
|>|>| | bag will still be helpfull also...).
|>|>
|>|>ok I made a small patch against your most recent code base:
|>|
|>|
|>| Thanks.
|>|
|>|
|>|>included:
|>|>- - a Makefile for the i2c-acpi-ec module
|>|>- - a Makefile for the smartbattery program which also calls the
|>|>i2c-acpi-ec make
|>|>process.
|>|>
|>|>in the smartbattery directory, one just "make"s and everything gets built.
|>|
|>|
|>| Ok.
|>
|>another thing: I changed the current drain from "mA or mWh" to "mAh or mW"
|>in
|>smartbattery.c but I'm having some doubts:
|
|
| It's mAh or mWh, depending of the value of CAPACITY_MODE.  This is a r/w
| bit in BatteryMode() word (the 15th).  If this bit is clear (default),
| then it is mAh and this is current in mAh.  If this bit is set, this
| power, exprimed as 10mWh
|
| I've fixed this issue.  Hopefully it should be ok now.
|
|

thanks. I actually read some of the pdf you pointed me to and implemented a
couple of functions on the smartbattery.c. It now gets much more information
from the battery. If you find it relevant, I'll clean it up a bit and post a
patch for you. I know it will soon be dumped, but it may show useful when
debugging other driver informations.

Is it safe to change registers? I'd like to get the CAPACITY_MODE changed to 1
but I'm afraid to ruin something. If I write a word into that register with the
same values previously read but OR'd with the CAPACITY_MODE bit at 1, will that
be ok?


regards,
pedro venda.
- --

Pedro João Lopes Venda
email: pjvenda-pQd4kjVL+REh2FBCd0jGRA@public.gmane.org
http://arrakis.dhis.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB2rU5eRy7HWZxjWERAr+8AJ9xfxTRsJ9JRaDmc8qdThNf5MgSGACglygv
ugUwXI+hQ7pKjrc3TEoM89o=
=WmZa
-----END PGP SIGNATURE-----


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help