diff options
-rw-r--r-- | driver/bc12/pi3usb9281.c | 6 |
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; |