Other Parts Discussed in Thread: AM3351, TPS65217
We have custom board based AM3351 with bq27421 fuel gas guage and we ported linux BSP into that. Below is the description of our problem.
Booted linux in the board and connected power to charge the battery. Once battery capacity reaches between 96% to 100 %, shutdown the board using command. Now without removing power cable, power ON the board again and wait until linux boot to complete. This time the battery status is showing as charging but the current value is in negative (i.e) charging current is less than the drawing current. This scenario will continue until the battery capacity reaches 90%. After that the fuel gas gauge start producing more charging current than drawing current and battery capacity start increase.
Also this scenario is happening only if you shutdown the board while charging, when the battery capacity is between 96% to 100%.