summaryrefslogtreecommitdiff
path: root/board/wheatley
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-10-05 08:15:12 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-05 21:24:46 -0700
commit286b800f14b139ca5d349d35142d7f31f3655689 (patch)
tree1dad9a731db2ede5712aea0aac164120a9d6fe00 /board/wheatley
parent1e72cc1f5719d5c5df6dbe76a8c86f60a525fe1a (diff)
downloadchrome-ec-286b800f14b139ca5d349d35142d7f31f3655689.tar.gz
pd: Move *_set_input_current() to common code
Boards that use charge_manager have identical implementations of typec_set_input_current_limit() and pd_set_input_current_limit(), so move these functions to charge_manager. BUG=b:67413505 TEST=`make buildall -j`, also verify that fizz continues to power-on and boot AP, in both protected and unprotected mode, with barrel jack power and with zinger. BRANCH=None Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I99a5314d02c4696db944c0f8ac689405f4f1f707 Reviewed-on: https://chromium-review.googlesource.com/701412 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/wheatley')
-rw-r--r--board/wheatley/usb_pd_policy.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/board/wheatley/usb_pd_policy.c b/board/wheatley/usb_pd_policy.c
index e0bdef8e20..29cf4b4b9a 100644
--- a/board/wheatley/usb_pd_policy.c
+++ b/board/wheatley/usb_pd_policy.c
@@ -69,28 +69,6 @@ void pd_power_supply_reset(int port)
pd_send_host_event(PD_EVENT_POWER_CHANGE);
}
-void pd_set_input_current_limit(int port, uint32_t max_ma,
- uint32_t supply_voltage)
-{
-#ifdef CONFIG_CHARGE_MANAGER
- struct charge_port_info charge;
- charge.current = max_ma;
- charge.voltage = supply_voltage;
- charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge);
-#endif
-}
-
-void typec_set_input_current_limit(int port, uint32_t max_ma,
- uint32_t supply_voltage)
-{
-#ifdef CONFIG_CHARGE_MANAGER
- struct charge_port_info charge;
- charge.current = max_ma;
- charge.voltage = supply_voltage;
- charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge);
-#endif
-}
-
int pd_snk_is_vbus_provided(int port)
{
return !gpio_get_level(port ? GPIO_USB_C1_VBUS_WAKE_L :