Recent kernel commit breaks battery sensing
andy at openmoko.com
Wed Mar 4 09:04:52 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Somebody in the thread at some point said:
| the recent kernel commit
| commit b9de904e7aadd7b37c4035fd5d6f59e5f80089b6
| removes the line
| -#define HDQ_SAMPLE_PERIOD_US 20
| from drivers/power/hdq.c
| So HDQ_SAMPLE_PERIOD_US gets the value '10' from include/linux/hdq.h
| In hdq.c there is a line
| hdq_priv.hdq_ctr = 3000 / HDQ_SAMPLE_PERIOD_US;
| which previously resulted in 150, and now results in 300.
| As hdq_ctr is an 8 bit value we lose something, and the compiler
| Also I cannot read most values from /sys/class/power_supply/battery
| I get an error Timer expired.
| Restoring the #define makes my battery status visible again, but I
| don't know if that is the right fix...
This is my fault, I fixed it on andy-tracking by reducing the 3ms
timeout to 2.5ms with a reported-by for yourself.
Nice work tracking it down to the actual cause anyway!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the openmoko-kernel