From b1462bf1f3e3d138a782e4b5afa25afc7403f634 Mon Sep 17 00:00:00 2001 From: Vijay Hiremath Date: Fri, 8 Jul 2016 17:53:38 -0700 Subject: charger: BD99955: Get the VBUS level from the charger Added code to get the VBUS level by reading the charger registers. BUG=chrome-os-partner:55117 BRANCH=none TEST=Manually tested on Amenia, VBUS_VAL (5Ch) & VCC_VAL (5Eh) registers are updated with the correct VBUS value on the respective ports. Change-Id: I3b019b2d87e4c347f12596df387a2a659092ae25 Signed-off-by: Vijay Hiremath Reviewed-on: https://chromium-review.googlesource.com/359416 Commit-Ready: Vijay P Hiremath Tested-by: Vijay P Hiremath Reviewed-by: Shawn N --- include/charger.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/charger.h') diff --git a/include/charger.h b/include/charger.h index 3141c89bab..a98e3e0f99 100644 --- a/include/charger.h +++ b/include/charger.h @@ -99,6 +99,9 @@ int charger_set_voltage(int voltage); /* Discharge battery when on AC power. */ int charger_discharge_on_ac(int enable); +/* Get the VBUS level from the charger */ +int charger_get_vbus_level(void); + /* Custom board function to discharge battery when on AC power */ int board_discharge_on_ac(int enable); -- cgit v1.2.1