Prechádzať zdrojové kódy

asoc: codec: wcd9378: clear the interrupt once served

clear the interrupt once served.

Change-Id: I1cbd79d7fe080a52cd08063010dd9aec25117f26
Signed-off-by: Prasad Kumpatla <[email protected]>
Prasad Kumpatla 1 rok pred
rodič
commit
13c59f248e
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 5 1
      asoc/codecs/wcd9378/wcd9378.c

+ 5 - 1
asoc/codecs/wcd9378/wcd9378.c

@@ -233,12 +233,16 @@ static int wcd9378_handle_post_irq(void *data)
 	struct wcd9378_priv *wcd9378 = data;
 	u32 sts1 = 0, sts2 = 0, sts3 = 0;
 
+	regmap_write(wcd9378->regmap, SWRS_SCP_SDCA_INTSTAT_1, 0xff);
+	regmap_write(wcd9378->regmap, SWRS_SCP_SDCA_INTSTAT_2, 0xff);
+	regmap_write(wcd9378->regmap, SWRS_SCP_SDCA_INTSTAT_3, 0xff);
+
 	regmap_read(wcd9378->regmap, SWRS_SCP_SDCA_INTSTAT_1, &sts1);
 	regmap_read(wcd9378->regmap, SWRS_SCP_SDCA_INTSTAT_2, &sts2);
 	regmap_read(wcd9378->regmap, SWRS_SCP_SDCA_INTSTAT_3, &sts3);
 
 	wcd9378->tx_swr_dev->slave_irq_pending =
-			((sts1 || sts2 || !sts3) ? true : false);
+			((sts1 || sts2 || sts3) ? true : false);
 
 	return IRQ_HANDLED;
 }