tdm
Well-known member
- Apr 11, 2011
- 1,409
- 3,596
- 0
You had offline-charging right all along Tom, just needed a slight change in the order I believe. Seems your test for last_kmsg does work, but the tails were not applied appropriately.
Note- I have included root/sbin/ftmpower and system/bin/battery_charging binaries from the stock OV system dump in the build I tested this on via device_thunderc.mk. I haven't tried without them yet, so I don't know if they have any impact. They were not added in as part of this commit, will test without them tomorrow (too tired now).
In init.c, there was already a battchg_pause variable being used, but it was never flagged properly I assume due to the OS and kernel not communicating the reboot command. We can use the last_kmsg test to set that variable appropriately, and then it adds the boot-pause queue-tail at the right moment. No need to add warm/cold tails, or write new drivers for the kernel.
Great work! Thanks for investigating this. I totally missed the battchg_pause variable in init.c.