Long time ago Ezekeel, a xda-developers user, published a kernel mod for the Nexus S that let you choose the max percentage that the battery could reach while charging. It was called BLX aka Battery Life eXtender. I always set it to 80%. I've always been intrigued by extending the life of li-ion cells and that's the only work that goes into that direction AFAIK. I believe it was 2011. There hasn't been anything like that ever since.