summaryrefslogtreecommitdiff
path: root/board/host
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-11-19 10:59:31 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-21 02:44:56 +0000
commit911e21ccc12617c36caa1bb0a5c35ee7902f38c4 (patch)
tree9b82a0d58859b518d2e1390512c449c0bc2425e5 /board/host
parent905fc1cf6f469581154fe7ed3bc29cf766be1241 (diff)
downloadchrome-ec-911e21ccc12617c36caa1bb0a5c35ee7902f38c4.tar.gz
pd: wait tSnkTransition after ACCEPT to change voltage
Ensure that the PD source changes the output voltage after tSnkTransition delay after having sent the ACCEPT message (rather than before). Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=samus BUG=chrome-os-partner:33684 TEST=connect Zinger to a PD power sink and monitor VBUS and CC while doing a 20V to 5V transition. Change-Id: If86f59eec67630491f4e8dc13a52015ac2de918a Reviewed-on: https://chromium-review.googlesource.com/230805 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/host')
-rw-r--r--board/host/usb_pd_policy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/host/usb_pd_policy.c b/board/host/usb_pd_policy.c
index 6432e0ae7b..423add3543 100644
--- a/board/host/usb_pd_policy.c
+++ b/board/host/usb_pd_policy.c
@@ -97,7 +97,7 @@ void pd_set_max_voltage(unsigned mv)
max_mv = mv;
}
-int pd_request_voltage(uint32_t rdo)
+int pd_check_requested_voltage(uint32_t rdo)
{
int op_ma = rdo & 0x3FF;
int max_ma = (rdo >> 10) & 0x3FF;
@@ -116,13 +116,18 @@ int pd_request_voltage(uint32_t rdo)
if (max_ma > pdo_ma)
return EC_ERROR_INVAL; /* too much max current */
- CPRINTF("Switch to %d V %d mA (for %d/%d mA)\n",
+ CPRINTF("Requested %d V %d mA (for %d/%d mA)\n",
((pdo >> 10) & 0x3ff) * 50, (pdo & 0x3ff) * 10,
((rdo >> 10) & 0x3ff) * 10, (rdo & 0x3ff) * 10);
return EC_SUCCESS;
}
+void pd_transition_voltage(int idx)
+{
+ /* Not implemented */
+}
+
int pd_set_power_supply_ready(int port)
{
/* Not implemented */