summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-01-31 10:48:31 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-02 19:09:52 -0800
commitf08109522dab20b9621489ccf04e98c26c30cd3f (patch)
treedb3a002c7833c46244b1550150e7a7d2b3e1b367 /include
parent7e2f31f537c8e6bbf149d086543ead937fc9f329 (diff)
downloadchrome-ec-f08109522dab20b9621489ccf04e98c26c30cd3f.tar.gz
charge_ramp: Specify port number in board_is_vbus_too_low()
charge_ramp needs to make a decision based upon the VBUS level on one specific port - the port that is ramping. The VBUS level on any other charge ports (if present) is not relevant. BUG=chrome-os-partner:54099 BRANCH=reef, gru TEST=With subsequent patches, verify charge_ramp success with a variety of BC1.2 chargers. Change-Id: Ie0a51a577e2b7491222560cd08dd5321ff3b7975 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/435561 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/charge_ramp.h3
-rw-r--r--include/charger.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/charge_ramp.h b/include/charge_ramp.h
index 62145568c4..9718663d33 100644
--- a/include/charge_ramp.h
+++ b/include/charge_ramp.h
@@ -45,11 +45,12 @@ int board_is_consuming_full_charge(void);
/**
* Check if VBUS is too low
*
+ * @param port Charge ramp port
* @param ramp_state Current ramp state
*
* @return VBUS is sagging low
*/
-int board_is_vbus_too_low(enum chg_ramp_vbus_state ramp_state);
+int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state);
/**
* Get the input current limit set by ramp module
diff --git a/include/charger.h b/include/charger.h
index 86ff5edc34..a9f4f41fbd 100644
--- a/include/charger.h
+++ b/include/charger.h
@@ -99,8 +99,8 @@ 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);
+/* Get the VBUS voltage (mV) from the charger */
+int charger_get_vbus_voltage(int port);
/* Custom board function to discharge battery when on AC power */
int board_discharge_on_ac(int enable);