-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Somebody in the thread at some point said: | Andy Green wrote: | |> Jeffrey, if you are interested about what the battery experiences, there |> are a bunch of goodies from the Coulomb Counter in the battery |> accessible down /sys/class/power_supply/bat, just cat them. These tell |> you the battery's view of what is going on directly. |> |> # cat /sys/class/power_supply/bat/current_now |> |> is particularly interesting, this is the flow of current out of (+ve) or |> into (-ve) the battery in uA. These values come fresh from the Coulomb |> Counter each time, but that device itself updates its registers only |> every few seconds. | | Is there a Wiki page or docs that explain what each register is and the units it refers to? | especially in the .../power_supply/bat/... area which seems to have very pertinent information.
I think I will start one. There's some real gold down the /sys mine if you are interested in meddling. | Do the values appearing in the /sys/classes/... files differ anyway from what the hardware provides | or is it tweaked by the kernel? Some of the coulomb counter data is actually directly provided in very funny units relative to a sense resistor outside the chip (20mR in our case), the driver does the recommended computation and normalizes them to uV and uA as required by power_supply APIs. And temp in 0.25 Kelvin steps --> Celcius in 0.1 steps. But this is basically scaling up operation and you see otherwise unmassaged data. The datasheet is open http://www.ti.com/lit/gpn/bq27000 as is the driver of course http://git.openmoko.org/?p=kernel.git;a=blob;f=drivers/power/bq27000_battery.c;h=7020608e6e901f3e9b46fea911dfd41ed31f7877;hb=stable and you can see there are even more registers in there that don't map on to power_supply stuff. - -Andy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkiG2s4ACgkQOjLpvpq7dMphVgCeOwkYBBy5k//zcBT1+Agnt3rF YR8An1lrd2hoVij/6J106T/UnDARqbk2 =Kjb1 -----END PGP SIGNATURE----- _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community