summaryrefslogtreecommitdiff
path: root/include/charger.h
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2016-07-08 17:53:38 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-13 19:09:39 -0700
commitb1462bf1f3e3d138a782e4b5afa25afc7403f634 (patch)
tree362e987ebdeaa09c3d6076d78f6fa8487bca931d /include/charger.h
parentcd6328496f32b2f6a68e1b042b31cec6ad528d09 (diff)
downloadchrome-ec-b1462bf1f3e3d138a782e4b5afa25afc7403f634.tar.gz
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 <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/359416 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/charger.h')
-rw-r--r--include/charger.h3
1 files changed, 3 insertions, 0 deletions
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);