[prev in list] [next in list] [prev in thread] [next in thread]
List: alsa-devel
Subject: Re: [PATCH] ASoC: rt5663: add cancel_delayed_work_sync when system suspends
From: Mark Brown <broonie () kernel ! org>
Date: 2023-12-29 2:06:52
Message-ID: ZY4pvGWp1ns75v2F () finisterre ! sirena ! org ! uk
[Download RAW message or body]
On Fri, Dec 29, 2023 at 01:47:35AM +0000, Shuming [=E8=8C=83=E6=9B=B8=E9=8A=
=98] wrote:
> > > This patch makes sure that the workqueue is completed before the syst=
em
> > > + cancel_delayed_work_sync(&rt5663->jack_detect_work);
> > > + cancel_delayed_work_sync(&rt5663->jd_unplug_work);
> > Does something ensure that no more interrupts can fire after the work is
> > cancelled?
> As I knew, the JD source is not the wake-up source when the system suspen=
ds.
> This patch just makes sure the work is done to avoid the unexpected probl=
em.
The issue isn't unexpected wakes - it's if the work manages to start
running again before the system suspends. For example if a jack detect
interrupt is triggered while processing the second cancel there then the
jack_detect_work will be rescheduled during suspend. Interrupts will
still be active until a reasonable time later in the suspend process.
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic