summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l42.h
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2022-01-21 12:04:11 +0000
committerMark Brown <broonie@kernel.org>2022-01-24 13:31:34 +0000
commit5982b5a8ec7ddb076e774bdd0b17d74681ab0943 (patch)
treead5cc3f806987c606fd66734da7f410116e10736 /sound/soc/codecs/cs42l42.h
parent8d06f797f844d04a961f201f886f7f9985edc9bf (diff)
downloadlinux-5982b5a8ec7ddb076e774bdd0b17d74681ab0943.tar.bz2
ASoC: cs42l42: Change jack_detect_mutex to a lock of all IRQ handling
Rename jack_detect_mutex to irq_lock and make it lock the entire IRQ handling. The jack_detect_mutex was introduced to synchronize registering an ALSA jack handler, via cs42l42_set_jack(), with the jack state processing in the IRQ handler, and was taken only around the relevant part of the IRQ handling code. System suspend will need to synchronize with the IRQ handler thread so will need a similar mutex that surrounds all of the IRQ handling. Repurposing the existing jack_detect_mutex is the simplest option. It does no harm for a call to cs42l42_set_jack() to additionally block the first few lines of IRQ handling, and the only interrupts used by the driver are all for jack handling. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220121120412.672284-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs42l42.h')
-rw-r--r--sound/soc/codecs/cs42l42.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs42l42.h b/sound/soc/codecs/cs42l42.h
index 9fff183dce8e..53d96287abba 100644
--- a/sound/soc/codecs/cs42l42.h
+++ b/sound/soc/codecs/cs42l42.h
@@ -842,7 +842,7 @@ struct cs42l42_private {
struct gpio_desc *reset_gpio;
struct completion pdn_done;
struct snd_soc_jack *jack;
- struct mutex jack_detect_mutex;
+ struct mutex irq_lock;
int pll_config;
int bclk;
u32 sclk;