diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-07-17 19:31:04 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-07-19 15:38:47 -0700 |
commit | fd037e4eee05f4ac342d8da24b3d5df76602d242 (patch) | |
tree | ec7bc5a24db38d6e93eed177a5126839e311a357 /drivers/i2c | |
parent | 62b2257899a98ac458f4cd0a71f78934b4ae229f (diff) |
i2c: tegra: i2c slave initialization for non-dvc i2c
The slave configuration is required for non-dvc i2c.
This can be done by checking the i2c type "is_dvc"
in place of having another variable.
Change-Id: Ia80ba0f7a68e2dfaa13b5da94896b87f2877e047
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/116471
Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-tegra.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 429576d60527..64361563760d 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -170,7 +170,6 @@ struct tegra_i2c_dev { int irq; bool irq_disabled; int is_dvc; - bool is_slave; struct completion msg_complete; int msg_err; u8 *msg_buf; @@ -503,7 +502,7 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev) 0 << I2C_FIFO_CONTROL_RX_TRIG_SHIFT; i2c_writel(i2c_dev, val, I2C_FIFO_CONTROL); - if (i2c_dev->is_slave) + if (!i2c_dev->is_dvc) tegra_i2c_slave_init(i2c_dev); if (tegra_i2c_flush_fifos(i2c_dev)) @@ -936,9 +935,6 @@ static int __devinit tegra_i2c_probe(struct platform_device *pdev) i2c_dev->arb_recovery = plat->arb_recovery; init_completion(&i2c_dev->msg_complete); - if (irq == INT_I2C || irq == INT_I2C2 || irq == INT_I2C3) - i2c_dev->is_slave = true; - platform_set_drvdata(pdev, i2c_dev); if (i2c_dev->is_clkon_always) |