grunt: Set source current limit to enable 3A output

Call ppc_set_vbus_source_current_limit to enable 3A output.

BUG=b:69378796
BRANCH=none
TEST=connect PD sink and see 5V 3A on both ports

Change-Id: Ia38ebcb3b1b3d1148a00b3050fcda2bd2cf73af5
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/866158
Reviewed-by: Justin TerAvest <teravest@chromium.org>
This commit is contained in:
Edward Hill
2018-01-14 17:50:27 -08:00
committed by chrome-bot
parent 76bd681c8f
commit 7f1bb54c10

View File

@@ -125,8 +125,10 @@ void pd_power_supply_reset(int port)
if (prev_en)
pd_set_vbus_discharge(port, 1);
#ifdef CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT
/* Give back the current quota we are no longer using */
charge_manager_source_port(port, 0);
#endif /* defined(CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT) */
/* Notify host of power info change. */
pd_send_host_event(PD_EVENT_POWER_CHANGE);
@@ -141,9 +143,6 @@ int pd_set_power_supply_ready(int port)
if (rv)
return rv;
/* Ensure we advertise the proper available current quota */
charge_manager_source_port(port, 1);
pd_set_vbus_discharge(port, 0);
/* Provide Vbus. */
@@ -151,6 +150,11 @@ int pd_set_power_supply_ready(int port)
if (rv)
return rv;
#ifdef CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT
/* Ensure we advertise the proper available current quota */
charge_manager_source_port(port, 1);
#endif /* defined(CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT) */
/* Notify host of power info change. */
pd_send_host_event(PD_EVENT_POWER_CHANGE);
@@ -164,7 +168,7 @@ void pd_transition_voltage(int idx)
void typec_set_source_current_limit(int port, int rp)
{
/* TODO(ecgh): call ppc_set_vbus_source_current_limit */
ppc_set_vbus_source_current_limit(port, rp);
}
int pd_snk_is_vbus_provided(int port)