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 <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha 2020-07-22 12:46:21 +05:30
commit 1f87c16e25

View file

@ -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;