summaryrefslogtreecommitdiff
path: root/include/charge_ramp.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-10-05 09:50:08 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-06 13:47:12 -0700
commitb87fe062eca43fc00909098e716581bf2aeea7eb (patch)
tree890225b40bf562456984424adc1f243fb06ae7eb /include/charge_ramp.h
parent02045eb040227250689caec9b9401c2cd3861363 (diff)
downloadchrome-ec-b87fe062eca43fc00909098e716581bf2aeea7eb.tar.gz
charge_ramp: Move ramp allowed / ilim callbacks to common code
The decision on whether to ramp (and how high) depends on the quirks of charger identification, so move the decision out of board, into the drivers that implement usb_charger. Also, rename CONFIG_CHARGE_RAMP to CONFIG_CHARGE_RAMP_SW, to better contrast with the existing CONFIG_CHARGE_RAMP_HW. BUG=None TEST=Manual on kevin, verify ramp occurs when port plugged into Z840 workstation. BRANCH=None Change-Id: I5b395274133837a18a4f4ac34b59b623287be175 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/702681 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/charge_ramp.h')
-rw-r--r--include/charge_ramp.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/include/charge_ramp.h b/include/charge_ramp.h
index 9718663d33..51ad777aa1 100644
--- a/include/charge_ramp.h
+++ b/include/charge_ramp.h
@@ -17,40 +17,40 @@ enum chg_ramp_vbus_state {
};
/**
- * Check if ramping is allowed for given supplier
- *
- * @supplier Supplier to check
+ * Check if board is consuming full input current
*
- * @return Ramping is allowed for given supplier
+ * @return Board is consuming full input current
*/
-int board_is_ramp_allowed(int supplier);
+int board_is_consuming_full_charge(void);
/**
- * Get the maximum current limit that we are allowed to ramp to
+ * Check if VBUS is too low
*
- * @supplier Active supplier type
- * @sup_curr Input current limit based on supplier
+ * @param port Charge ramp port
+ * @param ramp_state Current ramp state
*
- * @return Maximum current in mA
+ * @return VBUS is sagging low
*/
-int board_get_ramp_current_limit(int supplier, int sup_curr);
+int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state);
/**
- * Check if board is consuming full input current
+ * Check if ramping is allowed for given supplier
*
- * @return Board is consuming full input current
+ * @supplier Supplier to check
+ *
+ * @return Ramping is allowed for given supplier
*/
-int board_is_consuming_full_charge(void);
+int chg_ramp_allowed(int supplier);
/**
- * Check if VBUS is too low
+ * Get the maximum current limit that we are allowed to ramp to
*
- * @param port Charge ramp port
- * @param ramp_state Current ramp state
+ * @supplier Active supplier type
+ * @sup_curr Input current limit based on supplier
*
- * @return VBUS is sagging low
+ * @return Maximum current in mA
*/
-int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state);
+int chg_ramp_max(int supplier, int sup_curr);
/**
* Get the input current limit set by ramp module