diff options
author | Karthikeyan Ramasubramanian <kramasub@chromium.org> | 2019-06-12 12:08:29 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-23 00:12:32 +0000 |
commit | 5ef0acf4d369e48013da29e5f20f11bfab82155a (patch) | |
tree | 63887a838a5dd3881af2fd76dbe2aaa57377c4fc | |
parent | 402649748ac71d4fcc67d3b6e387acc1e71b0922 (diff) | |
download | chrome-ec-5ef0acf4d369e48013da29e5f20f11bfab82155a.tar.gz |
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 <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1617894
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Auto-Submit: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1767527
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Tested-by: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | driver/tcpm/ps8xxx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index 35b76b6abd..9a4f96db81 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); |