AFAIK charging chip doest that at hardware level, already. Of course, one could rig something around battery temp sensor (savecpu way), but I'm afraid, that if it would be allowed to go wrong to such late stage, then you're doomed anyway. /Estel