diff options
author | Hervé Fache <h-fache@ti.com> | 2012-07-30 12:44:04 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-07-30 12:44:04 +0800 |
commit | 8b5c7315a2ecd2abb57eaa2b41906d17df1fb5ef (patch) | |
tree | e3110661921d41e0135af796c62cce561cff6021 | |
parent | fa692736d8d56527731f2d8a489a7740fecf57ca (diff) |
OMAP: I2C: disable IRQ when not used to not conflict with Ducati
Signed-off-by: Hervé Fache <h-fache@ti.com>
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index e87535a492c..9865f5167c0 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -177,7 +177,7 @@ enum { #define SYSC_IDLEMODE_SMART 0x2 #define SYSC_CLOCKACTIVITY_FCLK 0x2 - + /* I2C System Configuration Register (OMAP_I2C_SYSC): */ #define OMAP_I2C_SYSC_SRST (1 << 1) /* Soft Reset */ @@ -679,6 +679,9 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) if (r) goto out2; #endif + /* We have the bus, enable IRQ */ + enable_irq(dev->irq); + r = omap_i2c_wait_for_bb(dev); if (r < 0) r = omap_i2c_bus_clear(dev); @@ -707,6 +710,7 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) omap_i2c_wait_for_bb(dev); out: + disable_irq(dev->irq); #if USE_HW_SPINLOCK omap_i2c_hwspinlock_unlock(dev); out2: @@ -1157,6 +1161,9 @@ omap_i2c_probe(struct platform_device *pdev) omap_i2c_isr; r = request_irq(dev->irq, isr, 0, pdev->name, dev); + /* We enable IRQ only when request for I2C from master */ + disable_irq(dev->irq); + if (r) { dev_err(dev->dev, "failure requesting irq %i\n", dev->irq); goto err_unuse_clocks; |