Merge charge and battery stuffs from LGL22 v10a open source code

Change-Id: Icb6f0cfce177cd3c98521ada528c248767c0a4a7