summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Yu <davyu@nvidia.com>2014-03-07 23:10:50 +0900
committerHarry Hong <hhong@nvidia.com>2014-03-12 17:42:22 -0700
commit1da62bf1062d08c46593a43444f598a187db5ac3 (patch)
tree76e9ad0cbbf8d52666a309a7650c3ff36b130be4 /include
parentce98dc80f689cbc3a75ebf316fc07a9e67580bf9 (diff)
input: misc: mpu: fix i2c arbitration lost
Arbitration lost occurs when regulators are turned on while another i2c device on the same bus is transferring data. This impacts all the slave devices on the same bus. tegra-i2c tegra11-i2c.0: --- register dump for debugging ---- tegra-i2c tegra11-i2c.0: I2C_CNFG - 0x2c00 tegra-i2c tegra11-i2c.0: I2C_PACKET_TRANSFER_STATUS - 0xff0021 tegra-i2c tegra11-i2c.0: I2C_FIFO_CONTROL - 0xe0 tegra-i2c tegra11-i2c.0: I2C_FIFO_STATUS - 0x800080 tegra-i2c tegra11-i2c.0: I2C_INT_MASK - 0xec tegra-i2c tegra11-i2c.0: I2C_INT_STATUS - 0x2 tegra-i2c tegra11-i2c.0: msg->len - 3 tegra-i2c tegra11-i2c.0: is_msg_write - 1 tegra-i2c tegra11-i2c.0: buf_remaining - 0 tegra-i2c tegra11-i2c.0: i2c transfer timed out, addr 0x001c, data 0x6a tegra-i2c tegra11-i2c.0: arbitration lost during communicate to add 0x69 tegra-i2c tegra11-i2c.0: Recovered Arbitration lost tegra-i2c tegra11-i2c.0: arbitration lost during communicate to add 0x1c tegra-i2c tegra11-i2c.0: Recovered Arbitration lost tegra-i2c tegra11-i2c.0: arbitration lost during communicate to add 0x1c tegra-i2c tegra11-i2c.0: Recovered Arbitration lost Bug 1461473 Change-Id: I417e1e81fa0a1628784f5e6062fa6f8e1979a038 Signed-off-by: David Yu <davyu@nvidia.com> Reviewed-on: http://git-master/r/379058 Reviewed-by: Harry Hong <hhong@nvidia.com> Tested-by: Harry Hong <hhong@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mpu.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/mpu.h b/include/linux/mpu.h
index 876d805b8855..939847e83325 100644
--- a/include/linux/mpu.h
+++ b/include/linux/mpu.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 Invensense, Inc.
-* Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+* Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -56,6 +56,14 @@
**********************************************************************/
#define DEBUG_SYSFS_INTERFACE 1
+/*********************************************************************/
+/* LOCK_I2C_ON_REG_ON
+ * Lock I2C bus when regulators are turned on to avoid I2C error.
+ * Disable this feature if regulators are on the same bus.
+ * Otherwise deadlock occurs.
+**********************************************************************/
+#define LOCK_I2C_ON_REG_ON (1)
+
/* Mount maxtices for mount orientation.
* MTMAT_XXX_CCW_YYY
* XXX : mount position. TOP for top and BOT for bottom.