From 1f87c16e25292b0d3fa96b2e270ed9ebcbd08baf Mon Sep 17 00:00:00 2001 From: Vatsal Bucha Date: Wed, 22 Jul 2020 12:46:21 +0530 Subject: [PATCH] fsa4480: Fix headset not detected during system suspend Headset is not detected after system goes into suspend as sufficient delay is not given after pm_stay_awake for system to wakeup. Implementing freezable workqeueue after pm_stay_awake resolves the issue. Change-Id: Ia104a1577004a4242470f3b4150be23698fc92b1 Signed-off-by: Vatsal Bucha --- drivers/soc/qcom/fsa4480-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/fsa4480-i2c.c b/drivers/soc/qcom/fsa4480-i2c.c index 717ef691716b..f61be4ad4c49 100644 --- a/drivers/soc/qcom/fsa4480-i2c.c +++ b/drivers/soc/qcom/fsa4480-i2c.c @@ -105,7 +105,7 @@ static int fsa4480_usbc_event_changed(struct notifier_block *nb, dev_dbg(dev, "%s: queueing usbc_analog_work\n", __func__); pm_stay_awake(fsa_priv->dev); - schedule_work(&fsa_priv->usbc_analog_work); + queue_work(system_freezable_wq, &fsa_priv->usbc_analog_work); break; default: break;