diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2017-10-05 08:15:12 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-05 21:24:46 -0700 |
commit | 286b800f14b139ca5d349d35142d7f31f3655689 (patch) | |
tree | 1dad9a731db2ede5712aea0aac164120a9d6fe00 /board/kahlee | |
parent | 1e72cc1f5719d5c5df6dbe76a8c86f60a525fe1a (diff) | |
download | chrome-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/kahlee')
-rw-r--r-- | board/kahlee/usb_pd_policy.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/board/kahlee/usb_pd_policy.c b/board/kahlee/usb_pd_policy.c index 4f21038159..64b32ed937 100644 --- a/board/kahlee/usb_pd_policy.c +++ b/board/kahlee/usb_pd_policy.c @@ -131,30 +131,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_board_checks(void) { return EC_SUCCESS; |