Re: Re: first shoot for smartbattery

Pedro Venda
2005-01-04T01:56:26Z

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

Bruno Ducrot wrote:
| On Mon, Jan 03, 2005 at 06:02:59PM +0100, liste-9nAOAgdJVo4b1SvskN2V4Q@public.gmane.org wrote:
|
|>I did not look into the source... but usually the times are calculated:
|>You take the capacity (remain-value) and divide it by the current. As the
|>ACPI-1.0 spec only asks for a current-value, if you use a
|>rechargable-battery and if this is in discharging-mode, you see, that they
|>did only, what the specs asked as a minimum. I am not sure, if the
|>current-value would not need to be -1, if it is unknown however.
|>So it is quite clear, that dividing something (especially if this itself
|>is not zero) by zero will give you an +overflow... with MAX_UINT (65535
|>for 16bit) is the nearest representable value.
|>
|
|
| I'm much more a lazy man than that and much prefer to get those values
| from the sensor ;)
| The current is an int but it should be a short and is negative
| if discharging. Look at smartbattery data spec at
| http://www.sbs-forum.org/specs/index.html
|
| And the 2 times given was the same actually. It's now corrected.
|
| But as said, it's a first shot and smartbattery.c will soon be dead.
|
| Problem is: from the ASL, there is 2 Smart Batteries and a Smart Battery
| Selector (or a Smart Battery Manager).
| I can go for the easy path at least for the smartbattery, since there is
| already a driver for it in lm-sensors-2.9.0.

Is that driver working?

| But actually there may be more
| than one battery that can be reached at the same address, then I'm for
| sure that the smartbattery stuff from lm-sensors can not handle multiple
| batteries.
|

Would the result be the creation of /proc/acpi/battery and /proc/acpi/ac_adapter
like other batteries?

The way I see it, the i2c-acpi-ec driver allows the creation of the /proc files
so that userland programs can use them normally. Am I totally wrong and should
quickly look for the brown bag?

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

iD8DBQFB2ffKeRy7HWZxjWERAo20AKCFFcnL7TXzxYGopcccKZS6aWnJAACg+DuW
HdI0cqcta0XA+Qaw7ql16JQ=
=oyXJ
-----END PGP SIGNATURE-----