diff options
author | Scott Collyer <scollyer@google.com> | 2021-03-17 09:24:17 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-15 18:24:32 +0000 |
commit | 574d7f2f605e74c0ff0f412f2b6abe2b6420b266 (patch) | |
tree | 45d8484f6ef62af5fece95cb6c53d36156a3327d | |
parent | e721551bbbdf0eb0edf107f57efd49577a6f8d88 (diff) | |
download | chrome-ec-574d7f2f605e74c0ff0f412f2b6abe2b6420b266.tar.gz |
honeybuns: override function for pd_can_source_from_device
This CL adds honeybuns policy for power role swap. Always return false
so we will request a power role swap if in a sink role and port
partner is DRP capable.
BUG=b:182441965
BRANCH=None
TEST=verfied that on quiche when attaching as a sink that a power role
swap request is generated. Previously, quiche relied on the host
requesting a power role swap.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I9c81519b845b15611ed503fc5e582b15a75b72ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2768138
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | baseboard/honeybuns/usb_pd_policy.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/baseboard/honeybuns/usb_pd_policy.c b/baseboard/honeybuns/usb_pd_policy.c index 67ff188178..5cb726ed9a 100644 --- a/baseboard/honeybuns/usb_pd_policy.c +++ b/baseboard/honeybuns/usb_pd_policy.c @@ -228,6 +228,18 @@ int pd_check_power_swap(int port) return 0; } +__override bool pd_can_source_from_device(int port, const int pdo_cnt, + const uint32_t *pdos) +{ + /* + * This function is called to determine if this port can be charged by + * the port partner. We always want to be a power role source, so always + * return false. + */ + + return false; +} + static int vdm_is_dp_enabled(int port) { mux_state_t mux_state = usb_mux_get(port); |