From c3aa5d72a4a74245589c749d97cb1cca39e6380d Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Wed, 12 Jun 2019 12:08:29 -0600 Subject: drivers/tcpm/ps8xxx: Return hardcoded vendor and product id When the requester does not expect the chip information from the live target, return the hardcoded vendor and product id. BUG=b:128820536,b:119046668 BRANCH=None TEST=Boot to ChromeOS Change-Id: I74affb00951411a3483258a8db165038e7eb683f Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1617894 Tested-by: Karthikeyan Ramasubramanian Reviewed-by: Daisuke Nojiri Reviewed-by: Diana Z Commit-Queue: Karthikeyan Ramasubramanian Auto-Submit: Karthikeyan Ramasubramanian --- driver/tcpm/ps8xxx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index 590e642ab0..db243621b8 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -140,6 +140,11 @@ static int ps8xxx_get_chip_info(int port, int live, if (rv) return rv; + if (!live) { + (*chip_info)->vendor_id = PS8XXX_VENDOR_ID; + (*chip_info)->product_id = PS8XXX_PRODUCT_ID; + } + if ((*chip_info)->fw_version_number == 0 || (*chip_info)->fw_version_number == -1 || live) { rv = tcpc_read(port, FW_VER_REG, &val); -- cgit v1.2.1