I am trying to get the battery charge sensor working on my Red (with a WP7702).
I have two questions:
-
Do I need to do something like charge the battery completely and then tell it what the battery capacity is by writing /sys/devices/78b8000.i2c/i2c-4/i2c-6/6-0064/power_supply/LTC2942/charge_now? I suspect I do, but I’m not finding documentation on that either here or in general for Linux.
-
More confusing than #1: The Linux code, which matches the LTC2942 datasheet, uses the value of r_sense in several computations. The units for r_sense in the comments say “mOhms” (this is in mangOH/linux_kernel_modules/ltc294x/ltc2941-battery-gauge.c:71). However, the value set in linux_kernel_modules/mangoh/mangoh_red.c:169 is “18”. The schematic says R828, which I believe is Rsense, is a 68mOhm resistor. Shouldn’t mango_red.c use 68, not 18?