diff options
author | Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | 2011-05-13 06:30:42 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2011-05-24 19:20:50 -0400 |
commit | b5e890f7e70707d1e10e8d4844806d2223e8b36d (patch) | |
tree | 5cda127810c3426ebcdc5ff7c52250f652d4a6a6 | |
parent | 553553413a6abdda220a697ef439ba2f4b1d4a7c (diff) |
i2c-nomadik: remove the unnecessary delay
The delay in the driver seems to be not needed, so remove it.
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Reviewed-by: Markus Grape <markus.grape@stericsson.com>
Tested-by: Per Persson <per.xb.persson@stericsson.com>
Tested-by: Chethan Krishna N <chethan.krishna@stericsson.com>
Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r-- | drivers/i2c/busses/i2c-nomadik.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index e3cd62e40df5..b2de1a56dc8d 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/delay.h> | ||
19 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
21 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
@@ -105,9 +104,6 @@ | |||
105 | /* maximum threshold value */ | 104 | /* maximum threshold value */ |
106 | #define MAX_I2C_FIFO_THRESHOLD 15 | 105 | #define MAX_I2C_FIFO_THRESHOLD 15 |
107 | 106 | ||
108 | /* per-transfer delay, required for the hardware to stabilize */ | ||
109 | #define I2C_DELAY 150 | ||
110 | |||
111 | enum i2c_status { | 107 | enum i2c_status { |
112 | I2C_NOP, | 108 | I2C_NOP, |
113 | I2C_ON_GOING, | 109 | I2C_ON_GOING, |
@@ -269,12 +265,6 @@ static int init_hw(struct nmk_i2c_dev *dev) | |||
269 | dev->cli.operation = I2C_NO_OPERATION; | 265 | dev->cli.operation = I2C_NO_OPERATION; |
270 | 266 | ||
271 | exit: | 267 | exit: |
272 | /* | ||
273 | * TODO: What is this delay for? | ||
274 | * Must be pretty pointless since the hw block | ||
275 | * is frozen. Or? | ||
276 | */ | ||
277 | udelay(I2C_DELAY); | ||
278 | return stat; | 268 | return stat; |
279 | } | 269 | } |
280 | 270 | ||
@@ -652,7 +642,6 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
652 | 642 | ||
653 | break; | 643 | break; |
654 | } | 644 | } |
655 | udelay(I2C_DELAY); | ||
656 | } | 645 | } |
657 | if (status == 0) | 646 | if (status == 0) |
658 | break; | 647 | break; |
@@ -778,13 +767,8 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) | |||
778 | } | 767 | } |
779 | } | 768 | } |
780 | 769 | ||
781 | i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MTD); | 770 | disable_all_interrupts(dev); |
782 | i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MTDWS); | 771 | clear_all_interrupts(dev); |
783 | |||
784 | disable_interrupts(dev, | ||
785 | (I2C_IT_TXFNE | I2C_IT_TXFE | I2C_IT_TXFF | ||
786 | | I2C_IT_TXFOVR | I2C_IT_RXFNF | ||
787 | | I2C_IT_RXFF | I2C_IT_RXFE)); | ||
788 | 772 | ||
789 | if (dev->cli.count) { | 773 | if (dev->cli.count) { |
790 | dev->result = -EIO; | 774 | dev->result = -EIO; |