1184bce0e32f17d45b3fc3ba7b0a6aabc9169f13
[openwrt/staging/hauke.git] /
1 From a22b10e2c273308f547c5ad96e3820f312058ae7 Mon Sep 17 00:00:00 2001
2 From: Viorel Suman <viorel.suman@nxp.com>
3 Date: Sun, 30 Apr 2017 12:41:33 +0300
4 Subject: [PATCH] ASoC: fsl_(e)sai: introduce "shared-interrupt" DT flag (part
5 2)
6
7 SAI & ESAI interfaces may share the same interrupt with EDMA,
8 so that we need a flag to trigger proper shared interrupt
9 handling. For compatibility the same DT flag, "shared-interrupt",
10 is introduced as the one used in drivers/dma/fsl-edma-v3.c.
11
12 Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
13 [ Aisheng: split easi changes ]
14 Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
15 ---
16 sound/soc/fsl/fsl_sai.c | 8 +++++++-
17 1 file changed, 7 insertions(+), 1 deletion(-)
18
19 --- a/sound/soc/fsl/fsl_sai.c
20 +++ b/sound/soc/fsl/fsl_sai.c
21 @@ -910,6 +910,7 @@ static int fsl_sai_probe(struct platform
22 char tmp[8];
23 int irq, ret, i;
24 int index;
25 + unsigned long irqflag = 0;
26
27 sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL);
28 if (!sai)
29 @@ -979,7 +980,12 @@ static int fsl_sai_probe(struct platform
30 return irq;
31 }
32
33 - ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
34 + /* SAI shared interrupt */
35 + if (of_property_read_bool(np, "shared-interrupt"))
36 + irqflag = IRQF_SHARED;
37 +
38 + ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, irqflag,
39 + np->name, sai);
40 if (ret) {
41 dev_err(&pdev->dev, "failed to claim irq %u\n", irq);
42 return ret;