Revert "ASoC: wsa883x: Add check before enable/disable PDM WD irq"

This reverts commit 8553f349c0. With check
to enable/disable PDM WD, watchdog irq was never enabled. Thus remove the
check.

Change-Id: I6845b9aef5fe6c06afe2a2928b4071dd6c71ca00
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha 2021-09-26 22:28:21 -07:00 • committed by Gerrit - the friendly Code Review server
commit c948873360

View file

@ -1076,7 +1076,6 @@ static int wsa883x_spkr_event(struct snd_soc_dapm_widget *w,
struct snd_soc_component *component =
snd_soc_dapm_to_component(w->dapm);
struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component);
struct irq_data *irq_data = NULL;
dev_dbg(component->dev, "%s: %s %d\n", __func__, w->name, event);
switch (event) {
@ -1140,12 +1139,9 @@ static int wsa883x_spkr_event(struct snd_soc_dapm_widget *w,
WSA883X_PA_FSM_CTL, 0x01, 0x01);
break;
case SND_SOC_DAPM_PRE_PMD:
if (!test_bit(SPKR_ADIE_LB, &wsa883x->status_mask)) {
irq_data = irq_get_irq_data(WSA883X_IRQ_INT_PDM_WD);
if (irq_data && !irqd_irq_disabled(irq_data))
wcd_disable_irq(&wsa883x->irq_info,
WSA883X_IRQ_INT_PDM_WD);
}
if (!test_bit(SPKR_ADIE_LB, &wsa883x->status_mask))
wcd_disable_irq(&wsa883x->irq_info,
WSA883X_IRQ_INT_PDM_WD);
snd_soc_component_update_bits(component,
WSA883X_VBAT_ADC_FLT_CTL,
0x01, 0x00);
@ -1517,7 +1513,6 @@ static int wsa883x_event_notify(struct notifier_block *nb,
u16 event = (val & 0xffff);
struct wsa883x_priv *wsa883x = container_of(nb, struct wsa883x_priv,
parent_nblock);
struct irq_data *irq_data = NULL;
if (!wsa883x)
return -EINVAL;
@ -1546,10 +1541,8 @@ static int wsa883x_event_notify(struct notifier_block *nb,
snd_soc_component_update_bits(wsa883x->component,
WSA883X_PA_FSM_CTL,
0x01, 0x01);
irq_data = irq_get_irq_data(WSA883X_IRQ_INT_PDM_WD);
if (irq_data && irqd_irq_disabled(irq_data))
wcd_enable_irq(&wsa883x->irq_info,
WSA883X_IRQ_INT_PDM_WD);
wcd_enable_irq(&wsa883x->irq_info,
WSA883X_IRQ_INT_PDM_WD);
/* Added delay as per HW sequence */
usleep_range(3000, 3100);
snd_soc_component_update_bits(wsa883x->component,