| @@ -819,8 +819,9 @@ static int clk_sys_event(struct snd_soc_dapm_widget *w, · 818 unmodified lines |
| 819 | 819 | * don't want false reports. |
| 820 | 820 | */ |
| 821 | 821 | if (wm8994->jackdet && !wm8994->clk_has_run) { |
| 822 | | − schedule_delayed_work(&wm8994->jackdet_bootstrap, |
| 823 | | − msecs_to_jiffies(1000)); |
| 822 | + queue_delayed_work(system_power_efficient_wq, |
| 823 | + &wm8994->jackdet_bootstrap, |
| 824 | + msecs_to_jiffies(1000)); |
| 824 | 825 | wm8994->clk_has_run = true; |
| 825 | 826 | } |
| 826 | 827 | break; |
| @@ -1432,7 +1433,7 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING, · 605 unmodified lines |
| 1432 | 1433 | |
| 1433 | 1434 | #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \ |
| 1434 | 1435 | SOC_SINGLE_EXT(xname, reg, shift, max, invert, \ |
| 1435 | | − snd_soc_get_volsw, wm8994_put_class_w) |
| 1436 | + snd_soc_dapm_get_volsw, wm8994_put_class_w) |
| 1436 | 1437 | |
| 1437 | 1438 | static int wm8994_put_class_w(struct snd_kcontrol *kcontrol, |
| 1438 | 1439 | struct snd_ctl_elem_value *ucontrol) |
| @@ -3485,7 +3486,8 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data) · 2046 unmodified lines |
| 3485 | 3486 | |
| 3486 | 3487 | pm_wakeup_event(codec->dev, 300); |
| 3487 | 3488 | |
| 3488 | | − schedule_delayed_work(&priv->mic_work, msecs_to_jiffies(250)); |
| 3489 | + queue_delayed_work(system_power_efficient_wq, |
| 3490 | + &priv->mic_work, msecs_to_jiffies(250)); |
| 3489 | 3491 | |
| 3490 | 3492 | return IRQ_HANDLED; |
| 3491 | 3493 | } |
| @@ -3573,8 +3575,9 @@ static void wm8958_mic_id(void *data, u16 status) · 81 unmodified lines |
| 3573 | 3575 | /* If nothing present then clear our statuses */ |
| 3574 | 3576 | dev_dbg(codec->dev, "Detected open circuit\n"); |
| 3575 | 3577 | |
| 3576 | | − schedule_delayed_work(&wm8994->open_circuit_work, |
| 3577 | | − msecs_to_jiffies(2500)); |
| 3578 | + queue_delayed_work(system_power_efficient_wq, |
| 3579 | + &wm8994->open_circuit_work, |
| 3580 | + msecs_to_jiffies(2500)); |
| 3578 | 3581 | return; |
| 3579 | 3582 | } |
| 3580 | 3583 | |
| @@ -3688,8 +3691,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) · 107 unmodified lines |
| 3688 | 3691 | WM1811_JACKDET_DB, 0); |
| 3689 | 3692 | |
| 3690 | 3693 | delay = control->pdata.micdet_delay; |
| 3691 | | − schedule_delayed_work(&wm8994->mic_work, |
| 3692 | | − msecs_to_jiffies(delay)); |
| 3694 | + queue_delayed_work(system_power_efficient_wq, |
| 3695 | + &wm8994->mic_work, |
| 3696 | + msecs_to_jiffies(delay)); |
| 3693 | 3697 | } else { |
| 3694 | 3698 | dev_dbg(codec->dev, "Jack not detected\n"); |
| 3695 | 3699 | |
| @@ -3934,8 +3938,9 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) · 238 unmodified lines |
| 3934 | 3938 | id_delay = wm8994->wm8994->pdata.mic_id_delay; |
| 3935 | 3939 | |
| 3936 | 3940 | if (wm8994->mic_detecting) |
| 3937 | | − schedule_delayed_work(&wm8994->mic_complete_work, |
| 3938 | | − msecs_to_jiffies(id_delay)); |
| 3941 | + queue_delayed_work(system_power_efficient_wq, |
| 3942 | + &wm8994->mic_complete_work, |
| 3943 | + msecs_to_jiffies(id_delay)); |
| 3939 | 3944 | else |
| 3940 | 3945 | wm8958_button_det(codec, reg); |
| 3941 | 3946 | |
| @@ -4008,9 +4013,6 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) · 66 unmodified lines |
| 4008 | 4013 | |
| 4009 | 4014 | wm8994->micdet_irq = control->pdata.micdet_irq; |
| 4010 | 4015 | |
| 4011 | | − pm_runtime_enable(codec->dev); |
| 4012 | | − pm_runtime_idle(codec->dev); |
| 4013 | | − |
| 4014 | 4016 | /* By default use idle_bias_off, will override for WM8994 */ |
| 4015 | 4017 | codec->dapm.idle_bias_off = 1; |
| 4016 | 4018 | |
| @@ -4383,8 +4385,6 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) · 366 unmodified lines |
| 4383 | 4385 | |
| 4384 | 4386 | wm8994_set_bias_level(codec, SND_SOC_BIAS_OFF); |
| 4385 | 4387 | |
| 4386 | | − pm_runtime_disable(codec->dev); |
| 4387 | | − |
| 4388 | 4388 | for (i = 0; i < ARRAY_SIZE(wm8994->fll_locked); i++) |
| 4389 | 4389 | wm8994_free_irq(wm8994->wm8994, WM8994_IRQ_FLL1_LOCK + i, |
| 4390 | 4390 | &wm8994->fll_locked[i]); |
| @@ -4443,6 +4443,9 @@ static int wm8994_probe(struct platform_device *pdev) · 52 unmodified lines |
| 4443 | 4443 | |
| 4444 | 4444 | wm8994->wm8994 = dev_get_drvdata(pdev->dev.parent); |
| 4445 | 4445 | |
| 4446 | + pm_runtime_enable(&pdev->dev); |
| 4447 | + pm_runtime_idle(&pdev->dev); |
| 4448 | + |
| 4446 | 4449 | return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm8994, |
| 4447 | 4450 | wm8994_dai, ARRAY_SIZE(wm8994_dai)); |
| 4448 | 4451 | } |
| @@ -4450,6 +4453,8 @@ static int wm8994_probe(struct platform_device *pdev) · 1 unmodified line |
| 4450 | 4453 | static int wm8994_remove(struct platform_device *pdev) |
| 4451 | 4454 | { |
| 4452 | 4455 | snd_soc_unregister_codec(&pdev->dev); |
| 4456 | + pm_runtime_disable(&pdev->dev); |
| 4457 | + |
| 4453 | 4458 | return 0; |
| 4454 | 4459 | } |
| 4455 | 4460 | |