summaryrefslogtreecommitdiff
path: root/include/charger.h
diff options
context:
space:
mode:
authorDave Parker <dparker@chromium.org>2013-07-17 01:28:29 -0700
committerChromeBot <chrome-bot@google.com>2013-07-19 18:01:48 -0700
commitc243537dda10b1f48b08d444d3cc22673e8edcf1 (patch)
tree5d99cfdc2fcfaa82a96577f4f3e86a17cab1c943 /include/charger.h
parent50ebe0565285562d080f7194f9f93f6b961c323f (diff)
downloadchrome-ec-c243537dda10b1f48b08d444d3cc22673e8edcf1.tar.gz
Constrain charging voltage to values chargers can provide.
BUG=chrome-os-partner:20863 BRANCH=falco,peppy,slippy,wolf TEST=Manual. On Peppy, there should no longer be "Charging Voltage" messages every second on the EC console. On other platforms verify that V_Batt reported by the 'charger' command is divisible by 16. Change-Id: Idd775a1d8033ff3405d10919e1e15ddddebc6c23 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62699 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/charger.h')
-rw-r--r--include/charger.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/charger.h b/include/charger.h
index 661433d21a..9b75bb95b2 100644
--- a/include/charger.h
+++ b/include/charger.h
@@ -53,6 +53,15 @@ int charger_set_mode(int mode);
*/
int charger_closest_current(int current);
+/**
+ * Return the closest match the charger can supply to the requested voltage.
+ *
+ * @param voltage Requested voltage in mV.
+ *
+ * @return Voltage the charger will actually supply if <voltage> is requested.
+ */
+int charger_closest_voltage(int voltage);
+
/* Get/set charge current limit in mA */
int charger_get_current(int *current);
int charger_set_current(int current);