未验证 提交 cf6b68d1 编写于 作者: J John Hsu 提交者: Mark Brown

ASoC: nau8824: move key irq after jd done

It is possible to get the fake key press interruption when the codec
do jack detection. We think it's proper to move the key interruption
configuration after jack detection done.
Signed-off-by: NJohn Hsu <KCHSU0@nuvoton.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 2bd6bf03
...@@ -843,6 +843,11 @@ static void nau8824_jdet_work(struct work_struct *work) ...@@ -843,6 +843,11 @@ static void nau8824_jdet_work(struct work_struct *work)
event_mask |= SND_JACK_HEADSET; event_mask |= SND_JACK_HEADSET;
snd_soc_jack_report(nau8824->jack, event, event_mask); snd_soc_jack_report(nau8824->jack, event, event_mask);
/* Enable short key press and release interruption. */
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING,
NAU8824_IRQ_KEY_RELEASE_DIS |
NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0);
nau8824_sema_release(nau8824); nau8824_sema_release(nau8824);
} }
...@@ -850,13 +855,12 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824) ...@@ -850,13 +855,12 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824)
{ {
struct regmap *regmap = nau8824->regmap; struct regmap *regmap = nau8824->regmap;
/* Enable jack ejection, short key press and release interruption. */ /* Enable jack ejection interruption. */
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING_1, regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING_1,
NAU8824_IRQ_INSERT_EN | NAU8824_IRQ_EJECT_EN, NAU8824_IRQ_INSERT_EN | NAU8824_IRQ_EJECT_EN,
NAU8824_IRQ_EJECT_EN); NAU8824_IRQ_EJECT_EN);
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING, regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING,
NAU8824_IRQ_EJECT_DIS | NAU8824_IRQ_KEY_RELEASE_DIS | NAU8824_IRQ_EJECT_DIS, 0);
NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0);
/* Enable internal VCO needed for interruptions */ /* Enable internal VCO needed for interruptions */
nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0); nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0);
regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL, regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册