fix charger mode detection

Change-Id: Ic10913786edabe509569ef81eb808a4ee39254f9