Merge branches 'for-2639/i2c/i2c-ce4100-v6', 'for-2639/i2c/i2c-eg20t-v3' and 'for...
[cascardo/linux.git] / sound / soc / soc-jack.c
index 4579ee0..fcab80b 100644 (file)
@@ -101,7 +101,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
        }
 
        /* Report before the DAPM sync to help users updating micbias status */
-       blocking_notifier_call_chain(&jack->notifier, status, NULL);
+       blocking_notifier_call_chain(&jack->notifier, status, jack);
 
        snd_soc_dapm_sync(dapm);
 
@@ -330,6 +330,14 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
                if (ret)
                        goto err;
 
+               if (gpios[i].wake) {
+                       ret = set_irq_wake(gpio_to_irq(gpios[i].gpio), 1);
+                       if (ret != 0)
+                               printk(KERN_ERR
+                                 "Failed to mark GPIO %d as wake source: %d\n",
+                                       gpios[i].gpio, ret);
+               }
+
 #ifdef CONFIG_GPIO_SYSFS
                /* Expose GPIO value over sysfs for diagnostic purposes */
                gpio_export(gpios[i].gpio, false);