summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5677.h
diff options
context:
space:
mode:
authorFletcher Woodruff <fletcherw@chromium.org>2019-06-14 13:48:52 -0600
committerMark Brown <broonie@kernel.org>2019-06-17 16:12:45 +0100
commit241800642ea3482ab3f80a2a3662e9f2e6a82208 (patch)
treec2076a011be8fef3372adc790e4dc6cc3b363644 /sound/soc/codecs/rt5677.h
parent8893cba2fa6994ac8434cbc616eeddcde211ec45 (diff)
ASoC: rt5677: move jack-detect init to i2c probe
This patch moves the code to select the gpios for jack detection from rt5677_probe to rt5677_init_irq (called from rt5677_i2c_probe). It also sets some registers to fix bugs related to jack detection, and adds some constants and comments to make it easier to understand what certain register settings are controlling. Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Fletcher Woodruff <fletcherw@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5677.h')
-rw-r--r--sound/soc/codecs/rt5677.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5677.h b/sound/soc/codecs/rt5677.h
index 076e5161d8da..c26edd387e34 100644
--- a/sound/soc/codecs/rt5677.h
+++ b/sound/soc/codecs/rt5677.h
@@ -1664,6 +1664,12 @@
#define RT5677_GPIO6_P_NOR (0x0 << 0)
#define RT5677_GPIO6_P_INV (0x1 << 0)
+/* General Control (0xfa) */
+#define RT5677_IRQ_DEBOUNCE_SEL_MASK (0x3 << 3)
+#define RT5677_IRQ_DEBOUNCE_SEL_MCLK (0x0 << 3)
+#define RT5677_IRQ_DEBOUNCE_SEL_RC (0x1 << 3)
+#define RT5677_IRQ_DEBOUNCE_SEL_SLIM (0x2 << 3)
+
/* Virtual DSP Mixer Control (0xf7 0xf8 0xf9) */
#define RT5677_DSP_IB_01_H (0x1 << 15)
#define RT5677_DSP_IB_01_H_SFT 15