Hello, i am trying to get the LiPo battery status.
I run the A20 image downloaded form olimex site.
uname -a returns "Linux a20-OLinuXino 3.4.64+ #6 SMP PREEMPT Fri Nov 1 17:32:40 EET 2013 armv7l GNU/Linux"
I read about the AXP209 chip and found it is connected to i2c0 interface.
I have a battery connected and the orange led is lit showing it is charging.
In the forums, i have found out, that battery status is shown through the /sys/class/power_supply/battery, however, there is no such directory on my system. It ends with /power_supply/ being a totaly empty folder.
Then i found another location to look for /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply
Yet again, there is no such folder. It stops with supplyer.28
There is "power" directory, but it contains no data i'm looking for.
Doing the "dmesg | grep axp" i get the output as:
[ 2.459635] axp_mfd 0-0034: AXP (CHIP ID: 0x41) detected
[ 2.536096] axp20_ldo1: 1300 mV
[ 2.544639] axp20_ldo2: 1800 <--> 3300 mV at 3000 mV
[ 2.561514] axp20_ldo3: 700 <--> 3500 mV at 2800 mV
[ 2.571842] axp20_ldo4: 1250 <--> 3300 mV at 2800 mV
[ 2.582055] axp20_buck2: 700 <--> 2275 mV at 1400 mV
[ 2.592295] axp20_buck3: 700 <--> 3500 mV at 1250 mV
[ 2.602222] axp20_ldoio0: 1800 <--> 3300 mV at 2800 mV
[ 2.623539] input: axp20-supplyer as /devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/input/input1
[ 2.639771] axp20-supplyer: probe of axp20-supplyer.28 failed with error -22
[ 2.651704] axp20_ldo2: Failed to create debugfs directory
[ 3.133037] axp20_buck2: Failed to create debugfs directory
[ 3.336771] axp20_buck3: incomplete constraints, leaving on
[ 3.347180] axp20_buck2: incomplete constraints, leaving on
[ 3.357486] axp20_ldo4: incomplete constraints, leaving on
[ 3.367687] axp20_ldo3: incomplete constraints, leaving on
[ 3.404753] axp20_ldo2: incomplete constraints, leaving on
[ 3.419938] axp20_ldo1: incomplete constraints, leaving on
Well i see the error but i don't understand if its responsible for the absent battery information. And if it does, what does it mean? What has gone wrong and how do i fix it?
Are there any other ways to get battery status?
I need to know if battery is charging/discharging and what is the current charge level.
Hi,
did you make changes in FEX file? If i good remember it's necessary.