summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2019-06-05 13:45:52 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-06 20:56:22 +0000
commit915664bcacd1b25c8689c85fcaec42e5dff20253 (patch)
tree33a0a0c74df4a8b3103f362aabca6d8a0b54ecc0
parent0c5985a74f66f89f05d6f26666c15229fc68d1df (diff)
downloadchrome-ec-915664bcacd1b25c8689c85fcaec42e5dff20253.tar.gz
Intelrvp: Get current DP mode
Added get_dp_pin_mode function to get the current state of the DP pin to configure the virtual mux on Intel SOC. BUG=None BRANCH=None TEST=Verified the correct DP mode status on iclrvpy_ite Change-Id: I52cdb7bfbb87074d48d61a0a1cd21d0afcb9c59a Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1646534 Tested-by: Ayushee Shah <ayushee.shah@intel.corp-partner.google.com> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
-rw-r--r--baseboard/intelrvp/usb_pd_policy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/baseboard/intelrvp/usb_pd_policy.c b/baseboard/intelrvp/usb_pd_policy.c
index b0e3ede29b..f1bb4976dc 100644
--- a/baseboard/intelrvp/usb_pd_policy.c
+++ b/baseboard/intelrvp/usb_pd_policy.c
@@ -236,11 +236,16 @@ static int svdm_dp_status(int port, uint32_t *payload)
return 2;
};
+uint8_t board_get_dp_pin_mode(int port)
+{
+ return (uint8_t) pd_dfp_dp_get_pin_mode(port, dp_status[port]);
+}
+
static int svdm_dp_config(int port, uint32_t *payload)
{
int opos = pd_alt_mode(port, USB_SID_DISPLAYPORT);
int mf_pref = PD_VDO_DPSTS_MF_PREF(dp_status[port]);
- int pin_mode = pd_dfp_dp_get_pin_mode(port, dp_status[port]);
+ uint8_t pin_mode = board_get_dp_pin_mode(port);
if (!pin_mode)
return 0;