The PMIC for the A64 supports reading out the battery stats, I just dont know if the Linux kernel driver exposes that information to userspace already... /sys/class/power_supply/battery on my Ubuntu running on the pine has all the necessary entries:
I dont have a battery attached to test if the files contain actual values....
Code:
ubuntu@pine64:/sys/class/power_supply/battery$ ls -l
total 0
-r--r--r-- 1 root root 4096 Jun 16 18:51 capacity
-r--r--r-- 1 root root 4096 Jun 16 18:51 current_now
lrwxrwxrwx 1 root root 0 Jun 16 18:51 device -> ../../../axp81x-supplyer.47
-r--r--r-- 1 root root 4096 Jun 16 18:51 energy_full_design
-r--r--r-- 1 root root 4096 Jun 16 18:51 health
-r--r--r-- 1 root root 4096 Jun 16 18:51 model_name
-r--r--r-- 1 root root 4096 Jun 16 18:51 online
drwxr-xr-x 2 root root 0 Jun 16 18:51 power
-r--r--r-- 1 root root 4096 Jun 16 17:30 present
-r--r--r-- 1 root root 4096 Jun 16 18:51 status
lrwxrwxrwx 1 root root 0 Jun 16 18:51 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Jun 16 18:51 technology
-r--r--r-- 1 root root 4096 Jun 16 18:51 temp
-r--r--r-- 1 root root 4096 Jun 16 18:51 type
-rw-r--r-- 1 root root 4096 Jun 16 18:51 uevent
-r--r--r-- 1 root root 4096 Jun 16 18:51 voltage_max_design
-r--r--r-- 1 root root 4096 Jun 16 18:51 voltage_min_design
-r--r--r-- 1 root root 4096 Jun 16 18:51 voltage_now
ubuntu@pine64:/sys/class/power_supply/battery$
I dont have a battery attached to test if the files contain actual values....
Come have a chat in the Pine IRC channel >>