mbox series

[v2,0/3] ASOC: cs42l42: Add support for system suspend

Message ID 20220121120412.672284-1-rf@opensource.cirrus.com
Headers show
Series ASOC: cs42l42: Add support for system suspend | expand

Message

Richard Fitzgerald Jan. 21, 2022, 12:04 p.m. UTC
Add system suspend and resume handlers so that the cs42l42 is cleanly
put into power-off state during system suspend and the registers are
restored in resume.

The first two patches separate out two small changes that can stand
alone and are needed to enable the system suspend implementation:

1) Don't rely on there being a jack unplug IRQ before a plug IRQ.
There won't be if the unplug and plug happened while in system suspend.

2) Put a mutex around the entire IRQ handling so that the suspend can
ensure the last run of the IRQ handler has completed before it powers
down.

Changes since V1:
- Hold irq_lock mutex while restoring registers

Richard Fitzgerald (3):
  ASoC: cs42l42: Report full jack status when plug is detected
  ASoC: cs42l42: Change jack_detect_mutex to a lock of all IRQ handling
  ASoC: cs42l42: Handle system suspend

 sound/soc/codecs/cs42l42.c | 166 ++++++++++++++++++++++++++++++++++++++++++---
 sound/soc/codecs/cs42l42.h |   7 +-
 2 files changed, 163 insertions(+), 10 deletions(-)

Comments

Mark Brown Jan. 25, 2022, 10:20 a.m. UTC | #1
On Fri, 21 Jan 2022 12:04:09 +0000, Richard Fitzgerald wrote:
> Add system suspend and resume handlers so that the cs42l42 is cleanly
> put into power-off state during system suspend and the registers are
> restored in resume.
> 
> The first two patches separate out two small changes that can stand
> alone and are needed to enable the system suspend implementation:
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: cs42l42: Report full jack status when plug is detected
      commit: 8d06f797f844d04a961f201f886f7f9985edc9bf
[2/3] ASoC: cs42l42: Change jack_detect_mutex to a lock of all IRQ handling
      commit: 5982b5a8ec7ddb076e774bdd0b17d74681ab0943
[3/3] ASoC: cs42l42: Handle system suspend
      commit: f8593e88540052b3feaf1fb36f2c1c0484c9dc14

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark