* [PATCH] i2c:imx: use IRQF_SHARED mode to request IRQ
@ 2017-10-11 7:57 Wei Jinhua
2017-10-11 8:05 ` Uwe Kleine-König
2017-10-13 18:38 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wei Jinhua @ 2017-10-11 7:57 UTC (permalink / raw)
To: wsa; +Cc: linux-i2c, jochen, jiang.biao2, wei.jinhua1, zhong.weidong
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>
---
drivers/i2c/busses/i2c-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.1.0.GIT
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c:imx: use IRQF_SHARED mode to request IRQ
2017-10-11 7:57 [PATCH] i2c:imx: use IRQF_SHARED mode to request IRQ Wei Jinhua
@ 2017-10-11 8:05 ` Uwe Kleine-König
2017-10-13 18:38 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2017-10-11 8:05 UTC (permalink / raw)
To: Wei Jinhua; +Cc: wsa, linux-i2c, jochen, jiang.biao2, zhong.weidong
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>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c:imx: use IRQF_SHARED mode to request IRQ
2017-10-11 7:57 [PATCH] i2c:imx: use IRQF_SHARED mode to request IRQ Wei Jinhua
2017-10-11 8:05 ` Uwe Kleine-König
@ 2017-10-13 18:38 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-10-13 18:38 UTC (permalink / raw)
To: Wei Jinhua; +Cc: linux-i2c, jochen, jiang.biao2, zhong.weidong
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
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!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-13 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 7:57 [PATCH] i2c:imx: use IRQF_SHARED mode to request IRQ Wei Jinhua
2017-10-11 8:05 ` Uwe Kleine-König
2017-10-13 18:38 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.