diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-01-18 09:07:00 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-18 20:04:58 +0000 |
commit | 7dec6938c963e83b0015ec986d9f7fcb0564debc (patch) | |
tree | 88d4cc31acead9dd102ee8e1cab48cac8f602fb7 /driver | |
parent | 80aa3da22c46357462a3b0778c965a42d1aa1630 (diff) | |
download | chrome-ec-7dec6938c963e83b0015ec986d9f7fcb0564debc.tar.gz |
pi3usb9281: Accept alternate device id
PI3USB9281A is compatible with our existing driver but has a different
device ID.
BUG=chrome-os-partner:35567
TEST=Manual on samus_pd. Verify that "invalid ID 0x18" prints are not
seen on console.
BRANCH=Samus
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I275ed50fcbcb3c2e385292408be6de51055903fb
Reviewed-on: https://chromium-review.googlesource.com/241764
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/pi3usb9281.h | 3 | ||||
-rw-r--r-- | driver/usb_switch_pi3usb9281.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/driver/pi3usb9281.h b/driver/pi3usb9281.h index 38f1125535..f07575cc71 100644 --- a/driver/pi3usb9281.h +++ b/driver/pi3usb9281.h @@ -18,6 +18,9 @@ #define PI3USB9281_REG_RESET 0x1b #define PI3USB9281_REG_VBUS 0x1d +#define PI3USB9281_DEV_ID 0x10 +#define PI3USB9281_DEV_ID_A 0x18 + #define PI3USB9281_CTRL_INT_MASK (1 << 0) #define PI3USB9281_CTRL_AUTO (1 << 2) #define PI3USB9281_CTRL_SWITCH_AUTO (1 << 4) diff --git a/driver/usb_switch_pi3usb9281.c b/driver/usb_switch_pi3usb9281.c index 215ee124a5..fd7eecd4d4 100644 --- a/driver/usb_switch_pi3usb9281.c +++ b/driver/usb_switch_pi3usb9281.c @@ -204,7 +204,8 @@ static void pi3usb9281_init(void) for (i = 0; i < PI3USB9281_COUNT; i++) { dev_id = pi3usb9281_read(i, PI3USB9281_REG_DEV_ID); - if (dev_id != 0x10) + if (dev_id != PI3USB9281_DEV_ID && + dev_id != PI3USB9281_DEV_ID_A) CPRINTS("PI3USB9281[%d] invalid ID 0x%02x", i, dev_id); } } |