Message ID | 1507708640-11622-1-git-send-email-wei.jinhua1@zte.com.cn |
---|---|
State | Accepted |
Headers | show |
Series | i2c:imx: use IRQF_SHARED mode to request IRQ | expand |
On Wed, Oct 11, 2017 at 03:57:20PM +0800, Wei Jinhua wrote: > Some SoC share one irq number between I2C controllers. > For example, on the LS2088 board, I2C 1 and I2C 2 share > one irq number. In this case, only one I2C controller > can register successfully, and others will fail. > > Signed-off-by: Wei Jinhua <wei.jinhua1@zte.com.cn> > Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn> The irq handler seems to be prepared for this, too (i.e. it returns IRQ_NONE if no irq is pending), so: Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
On Wed, Oct 11, 2017 at 03:57:20PM +0800, Wei Jinhua wrote: > Some SoC share one irq number between I2C controllers. > For example, on the LS2088 board, I2C 1 and I2C 2 share > one irq number. In this case, only one I2C controller > can register successfully, and others will fail. > > Signed-off-by: Wei Jinhua <wei.jinhua1@zte.com.cn> > Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn> Applied to for-current, thanks!
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 54a47b4..e5c8b3d 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);