Recently, I was debugging a mobile phone project on the android platform, and found that the mobile phone cannot enter the STANDBY state, resulting in high power consumption,
1. Capture the kernel log in the STANDBY state of the system, that is, the/proc/kmsg file.
It is best to use the tcard to capture the log or redirect the kmsg file to the built-in USB flash drive space of the mobile phone. After the server has enough time, retrieve the log from the mobile phone for analysis.
2. The system does not enter a low-power sleep state, most of which are caused by frequent wakeup irq.
In the kernel pm_debug.c, void inc_irq (int irq) prints the irq of the wake-up System. The log keyword is "wakeup irq ="
3. Search for the key word "wakeup irq =" in the kernel log, that is, kmsg.
If irq = 142 appears frequently, you can find the corresponding irq processing function in the/proc/interrupts file on your mobile phone.
"142: 1528 irq-d-gpio taos_irq"
Later, we found a problem with the taos driver. After the change, the standby power consumption was normal.