]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ASoC: arizona: Set compressed IRQ to a wake source
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 20 Jun 2018 10:56:20 +0000 (11:56 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 20 Jun 2018 11:18:44 +0000 (12:18 +0100)
The current code is not setting the compressed IRQ as a wake
source.  Normally this doesn't cause any issues as the CODEC
IRQ is set as a wake source by the jack detection code and the
CODEC only produces a single IRQ line. However if the system
is not using jack detection the compressed audio IRQ should
still function as a wake source, as such directly set the
compressed audio IRQ as a wake source.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs47l24.c
sound/soc/codecs/wm5102.c
sound/soc/codecs/wm5110.c

index 196e9c343aeb79711530581209050f8568fb9e78..0da52ead91e0ed42aea0cd2ee8bc27da5f23b5df 100644 (file)
@@ -1283,6 +1283,12 @@ static int cs47l24_probe(struct platform_device *pdev)
                return ret;
        }
 
+       ret = arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 1);
+       if (ret != 0)
+               dev_warn(&pdev->dev,
+                        "Failed to set compressed IRQ as a wake source: %d\n",
+                        ret);
+
        arizona_init_common(arizona);
 
        ret = arizona_init_vol_limit(arizona);
@@ -1306,6 +1312,7 @@ static int cs47l24_probe(struct platform_device *pdev)
 err_spk_irqs:
        arizona_free_spk_irqs(arizona);
 err_dsp_irq:
+       arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
        arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, cs47l24);
 
        return ret;
@@ -1323,6 +1330,7 @@ static int cs47l24_remove(struct platform_device *pdev)
 
        arizona_free_spk_irqs(arizona);
 
+       arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
        arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, cs47l24);
 
        return 0;
index 1ac83388d1b824747f99a8bed7f5e9a85f272ee2..a01a0c0e01ebda73b22a0abe311a7e72ee2f4da9 100644 (file)
@@ -2094,6 +2094,12 @@ static int wm5102_probe(struct platform_device *pdev)
                return ret;
        }
 
+       ret = arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 1);
+       if (ret != 0)
+               dev_warn(&pdev->dev,
+                        "Failed to set compressed IRQ as a wake source: %d\n",
+                        ret);
+
        arizona_init_common(arizona);
 
        ret = arizona_init_vol_limit(arizona);
@@ -2117,6 +2123,7 @@ static int wm5102_probe(struct platform_device *pdev)
 err_spk_irqs:
        arizona_free_spk_irqs(arizona);
 err_dsp_irq:
+       arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
        arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5102);
 
        return ret;
@@ -2133,6 +2140,7 @@ static int wm5102_remove(struct platform_device *pdev)
 
        arizona_free_spk_irqs(arizona);
 
+       arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
        arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5102);
 
        return 0;
index fb9835dcd8367cefde27e112a46b535d69bb2141..00c735c585d9b75c8f0d12eabca634dfa4b0e657 100644 (file)
@@ -2455,6 +2455,12 @@ static int wm5110_probe(struct platform_device *pdev)
                return ret;
        }
 
+       ret = arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 1);
+       if (ret != 0)
+               dev_warn(&pdev->dev,
+                        "Failed to set compressed IRQ as a wake source: %d\n",
+                        ret);
+
        arizona_init_common(arizona);
 
        ret = arizona_init_vol_limit(arizona);
@@ -2478,6 +2484,7 @@ static int wm5110_probe(struct platform_device *pdev)
 err_spk_irqs:
        arizona_free_spk_irqs(arizona);
 err_dsp_irq:
+       arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
        arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5110);
 
        return ret;
@@ -2496,6 +2503,7 @@ static int wm5110_remove(struct platform_device *pdev)
 
        arizona_free_spk_irqs(arizona);
 
+       arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
        arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5110);
 
        return 0;