--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
Line 118: seq_printf to debugfs, not sysfs.
Line 325: pr_info: printk(KERN_INFO,...) (include/linux/kernel.h), a
boot message (boot console, dmesg).
> How do I know for sure what they are printing in case of the values in
> /sys/class/power_supply/battery/... ?
line 683 (in function ds2784_battery_probe, which starts on line 654)
di->bat.get_property = battery_get_property;
This sets battery_get_property as the function responsible for
providing values for /sys/class/power_supply/battery/ files.
battery_get_property is defined on line 335. You can see that current
and voltage are not scaled or converted.
Also, any new enough Linux kernel should have
Documentation/power/power_supply_class.txt and
include/linux/power_supply.h both saying
All voltages, currents, charges, energies, time and temperatures in µV,
µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise
stated. It's driver's job to convert its raw values to units in which
this class operates.
So if any battery driver is reporting mA or mV in sysfs, it's probably wrong.
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.