This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/BQ27210: current battery power

Part Number: BQ27210
Other Parts Discussed in Thread: BQEVSW

Tool/software: Linux

We mounted the bq27210 chip to the imx6 platform via I2C. But using the driver provided on the official website, I did not find information on the current battery level. How can I get information about the current battery level?

The debugging information is as follows:

root@imx6qsabresd:~# dmesg |grep bq
[ 1.905829] power_supply bq27210-0: uevent
[ 1.905838] power_supply bq27210-0: POWER_SUPPLY_NAME=bq27210-0
[ 1.906098] bq27xxx-battery 2-0055: data memory update not supported for chip
[ 1.913396] bq27xxx-battery 2-0055: battery is not calibrated! ignoring capacity values
[ 1.921496] power_supply bq27210-0: power_supply_changed
[ 1.921522] power_supply bq27210-0: power_supply_changed_work
[ 1.921538] power_supply bq27210-0: power_supply_am_i_supplied 0
[ 1.921548] power_supply bq27210-0: power_supply_update_bat_leds 2
[ 1.921568] power_supply bq27210-0: uevent
[ 1.921576] power_supply bq27210-0: POWER_SUPPLY_NAME=bq27210-0
[ 1.921598] power_supply bq27210-0: power_supply_am_i_supplied 0
[ 1.921608] power_supply bq27210-0: prop STATUS=Discharging
[ 1.921619] power_supply bq27210-0: prop PRESENT=1
[ 1.923517] power_supply bq27210-0: power_supply_changed
[ 1.924107] power_supply bq27210-0: prop VOLTAGE_NOW=4183000
[ 1.925553] power_supply bq27210-0: prop CURRENT_NOW=0
[ 1.925567] power_supply bq27210-0: driver has no data for `capacity' property
[ 1.925579] power_supply bq27210-0: prop CAPACITY_LEVEL=Normal
[ 1.925591] power_supply bq27210-0: prop TEMP=231
[ 1.925601] power_supply bq27210-0: driver has no data for `time_to_empty_now' property
[ 1.925609] power_supply bq27210-0: driver has no data for `time_to_empty_avg' property
[ 1.925617] power_supply bq27210-0: driver has no data for `time_to_full_now' property
[ 1.925626] power_supply bq27210-0: prop TECHNOLOGY=Li-ion
[ 1.925635] power_supply bq27210-0: driver has no data for `charge_full' property
[ 1.926248] power_supply bq27210-0: driver has no data for `charge_now' property
[ 1.926258] power_supply bq27210-0: prop CHARGE_FULL_DESIGN=2010624
[ 1.926268] power_supply bq27210-0: prop CYCLE_COUNT=7
[ 1.926275] power_supply bq27210-0: driver has no data for `health' property
[ 1.926283] power_supply bq27210-0: prop =Texas Instruments
[ 1.926299] power_supply bq27210-0: power_supply_changed_work
[ 1.926312] power_supply bq27210-0: power_supply_am_i_supplied 0
[ 1.926318] power_supply bq27210-0: power_supply_update_bat_leds 2
[ 1.926336] power_supply bq27210-0: uevent
[ 1.926342] power_supply bq27210-0: POWER_SUPPLY_NAME=bq27210-0
[ 1.926359] power_supply bq27210-0: power_supply_am_i_supplied 0
[ 1.926366] power_supply bq27210-0: prop STATUS=Discharging
[ 1.926375] power_supply bq27210-0: prop PRESENT=1
[ 1.927229] power_supply bq27210-0: prop VOLTAGE_NOW=4183000
[ 1.928596] power_supply bq27210-0: prop CURRENT_NOW=0
[ 1.928605] power_supply bq27210-0: driver has no data for `capacity' property
[ 1.928613] power_supply bq27210-0: prop CAPACITY_LEVEL=Normal
[ 1.928622] power_supply bq27210-0: prop TEMP=231
[ 1.928629] power_supply bq27210-0: driver has no data for `time_to_empty_now' property
[ 1.928635] power_supply bq27210-0: driver has no data for `time_to_empty_avg' property
[ 1.928641] power_supply bq27210-0: driver has no data for `time_to_full_now' property
[ 1.928649] power_supply bq27210-0: prop TECHNOLOGY=Li-ion
[ 1.928656] power_supply bq27210-0: driver has no data for `charge_full' property
[ 1.929289] power_supply bq27210-0: driver has no data for `charge_now' property
[ 1.929299] power_supply bq27210-0: prop CHARGE_FULL_DESIGN=2010624
[ 1.929307] power_supply bq27210-0: prop CYCLE_COUNT=7
[ 1.929315] power_supply bq27210-0: driver has no data for `health' property
[ 1.929322] power_supply bq27210-0: prop =Texas Instruments
[ 9.199696] power_supply bq27210-0: uevent
[ 9.199709] power_supply bq27210-0: POWER_SUPPLY_NAME=bq27210-0
[ 9.209979] power_supply bq27210-0: power_supply_am_i_supplied 0
[ 9.209996] power_supply bq27210-0: prop STATUS=Discharging

root@imx6qsabresd:/sys/class/power_supply# cd bq27210-0
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# ls
capacity current_now present time_to_empty_avg voltage_now
capacity_level cycle_count status time_to_empty_now
charge_full device subsystem time_to_full_now
charge_full_design health technology type
charge_now power temp uevent
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat health
cat: health: No data available
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat power/
cat: power/: Is a directory
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat voltage_now
4183000
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat capacity
cat: capacity: No data available
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat current_now
0
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat present
1
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat status
Discharging
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat temp
229
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat charge_now
cat: charge_now: No data available
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat type
Battery
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat time_to_full_now
cat: time_to_full_now: No data available
root@imx6qsabresd:/sys/class/power_supply/bq27210-0# cat time_to_empty_avg
cat: time_to_empty_avg: No data available