summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l42.h
diff options
context:
space:
mode:
authorLucas Tanure <tanureal@opensource.cirrus.com>2021-03-06 18:55:49 +0000
committerMark Brown <broonie@kernel.org>2021-03-10 13:14:27 +0000
commitc5b8ee0879bcdc5082d42fe92d3c235b74feef37 (patch)
tree3a713456706ca2cddcb52ab317e81d2929aba4de /sound/soc/codecs/cs42l42.h
parent585e7079de0eac555bcdfe6284e439ee05fb18cb (diff)
downloadlinux-c5b8ee0879bcdc5082d42fe92d3c235b74feef37.tar.bz2
ASoC: cs42l42: Report jack and button detection
Report the Jack events to the user space through ALSA. Also moves request_threaded_irq() to component_probe so it don't get interrupts before the initialization the struct snd_soc_jack. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210306185553.62053-12-tanureal@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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs42l42.h b/sound/soc/codecs/cs42l42.h
index c373259ed46f..e12828877a20 100644
--- a/sound/soc/codecs/cs42l42.h
+++ b/sound/soc/codecs/cs42l42.h
@@ -12,6 +12,8 @@
#ifndef __CS42L42_H__
#define __CS42L42_H__
+#include <sound/jack.h>
+
#define CS42L42_PAGE_REGISTER 0x00 /* Page Select Register */
#define CS42L42_WIN_START 0x00
#define CS42L42_WIN_LEN 0x100
@@ -768,6 +770,7 @@ struct cs42l42_private {
struct regulator_bulk_data supplies[CS42L42_NUM_SUPPLIES];
struct gpio_desc *reset_gpio;
struct completion pdn_done;
+ struct snd_soc_jack jack;
u32 sclk;
u32 srate;
u8 plug_state;