summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2019-05-14 19:16:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-23 02:14:13 -0700
commit30722719b52253a2537db2c95ab21b96275b4287 (patch)
tree3b28ce53cd7505f7776f475a012c017361dc4a35
parent437f541fab07d2b96e873187bba9a5a79529f58e (diff)
downloadchrome-ec-30722719b52253a2537db2c95ab21b96275b4287.tar.gz
pi3usb9281: Mask OVP, OCP, and recovery interrupts
Currently, we're handling only attach and detach interrupt and OVP recovery interrupt causes us to miss detach & attach events. This patch masks all unused interrupts. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b/125176293 BRANCH=none TEST=See b/125176293 Change-Id: I8387b96abdc073e608b6373b670cbb684b342736 Reviewed-on: https://chromium-review.googlesource.com/1621881 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--driver/bc12/pi3usb9281.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/bc12/pi3usb9281.c b/driver/bc12/pi3usb9281.c
index 0c43bb199b..ee7f81433d 100644
--- a/driver/bc12/pi3usb9281.c
+++ b/driver/bc12/pi3usb9281.c
@@ -151,15 +151,15 @@ static void pi3usb9281_init(int port)
CPRINTS("PI3USB9281 invalid ID 0x%02x", dev_id);
pi3usb9281_reset(port);
- pi3usb9281_set_interrupt_mask(port, 0xff);
pi3usb9281_enable_interrupts(port);
}
int pi3usb9281_enable_interrupts(int port)
{
- uint8_t ctrl = pi3usb9281_read(port, PI3USB9281_REG_CONTROL);
-
+ uint8_t ctrl;
+ pi3usb9281_set_interrupt_mask(port, PI3USB9281_INT_ATTACH_DETACH);
+ ctrl = pi3usb9281_read(port, PI3USB9281_REG_CONTROL);
if (ctrl == 0xee)
return EC_ERROR_UNKNOWN;