From b1d0aaf180b229b7ce745f5ae71bed62b6b9309c Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 13 Nov 2019 14:36:20 -0700 Subject: [PATCH] Fix test for direction switch --- src/ec/it8587e/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ec/it8587e/i2c.c b/src/ec/it8587e/i2c.c index 943cd70..0b829de 100644 --- a/src/ec/it8587e/i2c.c +++ b/src/ec/it8587e/i2c.c @@ -88,9 +88,9 @@ static int i2c_transaction(uint8_t * data, int length, bool read) { HOSTAA = HOSTAA; } else // If we are waiting on direction switch - if (HOCTLA & (1 << 2)) { + if (HOCTL2A & (1 << 2)) { // Complete direction switch - HOCTLA &= ~(1 << 2); + HOCTL2A &= ~(1 << 2); } else { // Start new transaction HOCTLA = (1 << 6) | (0b111 << 2);