summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5677.h
diff options
context:
space:
mode:
authorBen Zhang <benzh@chromium.org>2019-06-18 17:45:54 -0600
committerMark Brown <broonie@kernel.org>2019-06-19 12:46:24 +0100
commit4f7b018b55db0361718161e1471d8b7a16fdfa47 (patch)
tree945bda9d9c81f66f461b26492e9895aea504cc80 /sound/soc/codecs/rt5677.h
parent16395ceee11f8f8af764bac76adc20a43ba1a153 (diff)
downloadlinux-4f7b018b55db0361718161e1471d8b7a16fdfa47.tar.bz2
ASoC: rt5677: clear interrupts by polarity flip
The rt5677 jack detection function has a requirement that the polarity of an interrupt be flipped after it fires in order to clear the interrupt. This patch implements an irq_chip with irq_domain directly instead of using regmap-irq, so that interrupt source line polarities can be flipped in the irq handler. The reason that this patch does not add this feature within regmap-irq is that future patches will add hotword detection support to this irq handler. Those patches will require adding additional logic that would not make sense to have in regmap-irq. 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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5677.h b/sound/soc/codecs/rt5677.h
index c26edd387e34..45633d8b6a19 100644
--- a/sound/soc/codecs/rt5677.h
+++ b/sound/soc/codecs/rt5677.h
@@ -1749,6 +1749,7 @@ enum {
RT5677_IRQ_JD1,
RT5677_IRQ_JD2,
RT5677_IRQ_JD3,
+ RT5677_IRQ_NUM,
};
enum rt5677_type {
@@ -1827,6 +1828,7 @@ struct rt5677_platform_data {
struct rt5677_priv {
struct snd_soc_component *component;
+ struct device *dev;
struct rt5677_platform_data pdata;
struct regmap *regmap, *regmap_physical;
const struct firmware *fw1, *fw2;
@@ -1847,9 +1849,13 @@ struct rt5677_priv {
struct gpio_chip gpio_chip;
#endif
bool dsp_vad_en;
- struct regmap_irq_chip_data *irq_data;
bool is_dsp_mode;
bool is_vref_slow;
+
+ /* Interrupt handling */
+ struct irq_domain *domain;
+ struct mutex irq_lock;
+ unsigned int irq_en;
};
int rt5677_sel_asrc_clk_src(struct snd_soc_component *component,