Commit da42b4c279d6241cab87bff5ea6d83c02651ef7e

Authored by Russ Dill
Committed by Vaibhav Hiremath
1 parent bd967ca8af

IIO: ti_adc: Also clear threshold event when clearing overrun event

When an overrun occurs, the FIFO is cleared. If a FIFO threshold event
was pending, the data is now gone. Clear the threshold event when
handling an overrun (or underflow).

Signed-off-by: Russ Dill <Russ.Dill@ti.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

drivers/staging/iio/adc/ti_adc.c
... ... @@ -159,7 +159,8 @@
159 159  
160 160 adc_writel(adc_dev, TSCADC_REG_IRQSTATUS,
161 161 TSCADC_IRQENB_FIFO1OVRRUN |
162   - TSCADC_IRQENB_FIFO1UNDRFLW);
  162 + TSCADC_IRQENB_FIFO1UNDRFLW |
  163 + TSCADC_IRQENB_FIFO1THRES);
163 164  
164 165 adc_writel(adc_dev, TSCADC_REG_CTRL,
165 166 (config | TSCADC_CNTRLREG_TSCSSENB));