From adc6e5afed75ed83b1d49a0577f2b649aa0441f7 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Mon, 20 May 2013 16:03:14 +0800 Subject: Fix a bug in reading TSU6721 interrupt value The order of high byte and low byte was incorrect. BUG=None TEST=Dump interrupt value and check manually. BRANCH=spring Change-Id: I89dcaf39b1a67534081101807d8887ae91157b44 Original-Change-Id: I08657ad42bdc747cff2dd7d0e8be76fa44fc9563 Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/55718 Reviewed-by: Vincent Palatin --- common/tsu6721.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/tsu6721.c b/common/tsu6721.c index 999d4587a8..2f6e1f0a36 100644 --- a/common/tsu6721.c +++ b/common/tsu6721.c @@ -77,8 +77,8 @@ int tsu6721_get_interrupts(void) int tsu6721_peek_interrupts(void) { - saved_interrupts |= (tsu6721_read(TSU6721_REG_INT1) << 8) | - (tsu6721_read(TSU6721_REG_INT2)); + saved_interrupts |= (tsu6721_read(TSU6721_REG_INT2) << 8) | + (tsu6721_read(TSU6721_REG_INT1)); return saved_interrupts; } -- cgit v1.2.1