[alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
Signed-off-by: Michael Walle michael@walle.cc --- sound/soc/fsl/fsl_sai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index b517e4bc1b87..8c3ea7300972 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -958,7 +958,8 @@ static int fsl_sai_probe(struct platform_device *pdev) if (irq < 0) return irq;
- ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai); + ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, IRQF_SHARED, + np->name, sai); if (ret) { dev_err(&pdev->dev, "failed to claim irq %u\n", irq); return ret;
Hi Michael,
On Thu, Nov 28, 2019 at 7:38 PM Michael Walle michael@walle.cc wrote:
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
On i.MX8M SAI5 and SAI6 share the same interrupt number too:
Reviewed-by: Fabio Estevam festevam@gmail.com
Thanks
On Thu, Nov 28, 2019 at 11:38:02PM +0100, Michael Walle wrote:
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
Signed-off-by: Michael Walle michael@walle.cc
Acked-by: Nicolin Chen nicoleotsuka@gmail.com
Thanks
sound/soc/fsl/fsl_sai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index b517e4bc1b87..8c3ea7300972 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -958,7 +958,8 @@ static int fsl_sai_probe(struct platform_device *pdev) if (irq < 0) return irq;
- ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
- ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, IRQF_SHARED,
if (ret) { dev_err(&pdev->dev, "failed to claim irq %u\n", irq); return ret;np->name, sai);
-- 2.20.1
On Fri, Nov 29, 2019 at 12:40 AM Michael Walle michael@walle.cc wrote:
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
Hi Michael,
Thanks for the patch. We have a similar change inside our internal tree (it is on my long TODO list to upstream :D).
We add the shared flag conditionally on a dts property.
Do you think it is a good idea to always add shared flag? I'm thinking on SAI IP integrations where the interrupt is edge triggered.
AFAIK edge triggered interrupts do not get along very well with sharing an interrupt line.
Hi Daniel,
Am 2019-12-05 09:43, schrieb Daniel Baluta:
On Fri, Nov 29, 2019 at 12:40 AM Michael Walle michael@walle.cc wrote:
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
Hi Michael,
Thanks for the patch. We have a similar change inside our internal tree (it is on my long TODO list to upstream :D).
We add the shared flag conditionally on a dts property.
Do you think it is a good idea to always add shared flag? I'm thinking on SAI IP integrations where the interrupt is edge triggered.
Mhh, I don't really get the point to make the flag conditionally. If there is only one user, the flag won't hurt, correct?
If there are two users, we need the flag anyway.
AFAIK edge triggered interrupts do not get along very well with sharing an interrupt line.
So in that case you shouldn't use shared edge triggered interrupts in the SoC in the first place, I guess.
-michael
On Thu, Dec 5, 2019 at 11:18 AM Michael Walle michael@walle.cc wrote:
Hi Daniel,
Am 2019-12-05 09:43, schrieb Daniel Baluta:
On Fri, Nov 29, 2019 at 12:40 AM Michael Walle michael@walle.cc wrote:
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
Hi Michael,
Thanks for the patch. We have a similar change inside our internal tree (it is on my long TODO list to upstream :D).
We add the shared flag conditionally on a dts property.
Do you think it is a good idea to always add shared flag? I'm thinking on SAI IP integrations where the interrupt is edge triggered.
Mhh, I don't really get the point to make the flag conditionally. If there is only one user, the flag won't hurt, correct?
If there are two users, we need the flag anyway.
AFAIK edge triggered interrupts do not get along very well with sharing an interrupt line.
So in that case you shouldn't use shared edge triggered interrupts in the SoC in the first place, I guess.
I think you make a good point. I was thinking that it would hurt the single user case. But it is fine.
Thanks for the patch.
Acked-by: Daniel Baluta daniel.baluta@nxp.com
The patch
ASoC: fsl_sai: add IRQF_SHARED
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.6
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 2eb2d314a80eb8bb1a6faf2a74321d4497e1687d Mon Sep 17 00:00:00 2001
From: Michael Walle michael@walle.cc Date: Thu, 28 Nov 2019 23:38:02 +0100 Subject: [PATCH] ASoC: fsl_sai: add IRQF_SHARED
The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously.
Signed-off-by: Michael Walle michael@walle.cc Reviewed-by: Fabio Estevam festevam@gmail.com Acked-by: Nicolin Chen nicoleotsuka@gmail.com Acked-by: Daniel Baluta daniel.baluta@nxp.com Link: https://lore.kernel.org/r/20191128223802.18228-1-michael@walle.cc Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/fsl/fsl_sai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index b517e4bc1b87..8c3ea7300972 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -958,7 +958,8 @@ static int fsl_sai_probe(struct platform_device *pdev) if (irq < 0) return irq;
- ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai); + ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, IRQF_SHARED, + np->name, sai); if (ret) { dev_err(&pdev->dev, "failed to claim irq %u\n", irq); return ret;
participants (5)
-
Daniel Baluta
-
Fabio Estevam
-
Mark Brown
-
Michael Walle
-
Nicolin Chen