[tegra i2c] add de-bounce cycles.
authorJay Cheng <jacheng@nvidia.com>
Fri, 26 Nov 2010 17:08:39 +0000 (12:08 -0500)
committerTodd Poynor <toddpoynor@google.com>
Tue, 30 Nov 2010 23:25:04 +0000 (15:25 -0800)
Change-Id: I3549105bb1d1a7803a300849ddba9c17dad1efba
Signed-off-by: Ken Radtke <kradtke@nvidia.com>
drivers/i2c/busses/i2c-tegra.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 999ae2d..b7481f4
@@ -35,6 +35,7 @@
 #define BYTES_PER_FIFO_WORD 4
 
 #define I2C_CNFG                               0x000
+#define I2C_CNFG_DEBOUNCE_CNT_SHIFT            12
 #define I2C_CNFG_PACKET_MODE_EN                        (1<<10)
 #define I2C_CNFG_NEW_MASTER_FSM                        (1<<11)
 #define I2C_STATUS                             0x01C
@@ -312,7 +313,7 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
        if (i2c_dev->is_dvc)
                tegra_dvc_init(i2c_dev);
 
-       val = I2C_CNFG_NEW_MASTER_FSM | I2C_CNFG_PACKET_MODE_EN;
+       val = I2C_CNFG_NEW_MASTER_FSM | I2C_CNFG_PACKET_MODE_EN | (0x2 << I2C_CNFG_DEBOUNCE_CNT_SHIFT);
        i2c_writel(i2c_dev, val, I2C_CNFG);
        i2c_writel(i2c_dev, 0, I2C_INT_MASK);
        tegra_i2c_set_clk(i2c_dev, i2c_dev->last_bus_clk);