From: Jay Cheng Date: Fri, 26 Nov 2010 17:08:39 +0000 (-0500) Subject: [tegra i2c] add de-bounce cycles. X-Git-Tag: firefly_0821_release~9833^2~99^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61186dc145606f61c5988ccc3c5abb24bf27b543;p=firefly-linux-kernel-4.4.55.git [tegra i2c] add de-bounce cycles. Change-Id: I3549105bb1d1a7803a300849ddba9c17dad1efba Signed-off-by: Ken Radtke --- diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c old mode 100644 new mode 100755 index 999ae2d30e30..b7481f496ec3 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -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);