psyke83/android_kernel_samsung_msm — comment on commit 321428a6a8f075c729c6243f01537941a8bbb307
File: arch/arm/mach-msm/pm2.c line 1857
By coolya:

I think removing this should do the trick for charging. But It will prevent power off from recovery from working probably, I think it will then boot into recovery the next time you boot up the kernel. I am working on a proper user space solution for this. I am thinking of some little user space program that can be invoked with the recovery post-boot and pre-reboot scripts.
In general the param partition controls this behavior, and the param partition is just a flash dumped c struct with some bits in it.