[v2] i2c: imx: allow i2c devices share an interrupt

Message ID 20170911083416.2895-1-ying.zhang22455@nxp.com
State New
Headers show
Series
  • [v2] i2c: imx: allow i2c devices share an interrupt
Related show

Commit Message

ying.zhang22455@nxp.com Sept. 11, 2017, 8:34 a.m.
From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

Allow the I2C device on the same bus can’t claim irq.

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
[change from v1]
----update the commit message.

 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Uwe Kleine-König Sept. 11, 2017, 9:09 a.m. | #1
Hello,

On Mon, Sep 11, 2017 at 04:34:16PM +0800, ying.zhang22455@nxp.com wrote:
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> Allow the I2C device on the same bus can’t claim irq.

I don't understand the motivation for this change. Is there an
imx-platform that doesn't have a dedicated irq for i2c? The commit log
suggests there is an i2c device with the same irq. What is meant here, a
bus device or the imx operating in slave mode?

Best regards
Uwe

Patch

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 54a47b40546f..e5c8b3d5df77 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1100,7 +1100,7 @@  static int i2c_imx_probe(struct platform_device *pdev)
 	}
 
 	/* Request IRQ */
-	ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, 0,
+	ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, IRQF_SHARED,
 				pdev->name, i2c_imx);
 	if (ret) {
 		dev_err(&pdev->dev, "can't claim irq %d\n", irq);