kernel_optimize_test/drivers/iio/adc
Michael Engl e83bb3e6f3 iio: adc: ti_am335x_adc: fix fifo overrun recovery
The tiadc_irq_h(int irq, void *private) function is handling FIFO
overruns by clearing flags, disabling and enabling the ADC to
recover.

If the ADC is running in continuous mode a FIFO overrun happens
regularly. If the disabling of the ADC happens concurrently with
a new conversion. It might happen that the enabling of the ADC
is ignored by the hardware. This stops the ADC permanently. No
more interrupts are triggered.

According to the AM335x Reference Manual (SPRUH73H October 2011 -
Revised April 2013 - Chapter 12.4 and 12.5) it is necessary to
check the ADC FSM bits in REG_ADCFSM before enabling the ADC
again. Because the disabling of the ADC is done right after the
current conversion has been finished.

To trigger this bug it is necessary to run the ADC in continuous
mode. The ADC values of all channels need to be read in an endless
loop. The bug appears within the first 6 hours (~5.4 million
handled FIFO overruns). The user space application will hang on
reading new values from the character device.

Fixes: ca9a563805 ("iio: ti_am335x_adc: Add continuous sampling
support")
Signed-off-by: Michael Engl <michael.engl@wjw-solutions.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-03-15 19:47:23 +00:00
..
ad_sigma_delta.c
ad799x.c
ad7266.c
ad7291.c
ad7298.c
ad7476.c
ad7766.c iio:adc: ad7766: testing the wrong variable in probe 2016-11-12 14:35:21 +00:00
ad7791.c
ad7793.c
ad7887.c
ad7923.c
at91_adc.c
at91-sama5d2_adc.c
axp288_adc.c iio: adc: axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications 2017-01-10 19:54:57 +00:00
bcm_iproc_adc.c
berlin2-adc.c
cc10001_adc.c
da9150-gpadc.c
envelope-detector.c iio: envelope-detector: ADC driver based on a DAC and a comparator 2016-11-13 13:07:17 +00:00
exynos_adc.c IIO: Change msleep to usleep_range for small msecs 2016-12-03 08:58:40 +00:00
fsl-imx25-gcq.c iio: adc: imx25-gcq: Fix module autoload 2017-01-10 19:54:56 +00:00
hi8435.c
hx711.c iio: adc: hx711: Add IIO driver for AVIA HX711 2017-01-10 19:54:59 +00:00
imx7d_adc.c
ina2xx-adc.c iio:kfifo_buf header include push down. 2017-01-10 19:54:53 +00:00
Kconfig iio: adc: stm32: add optional dma support 2017-01-29 12:49:17 +00:00
lp8788_adc.c
lpc18xx_adc.c
ltc2485.c
Makefile iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs 2017-01-28 12:29:50 +00:00
max1027.c
max1363.c iio: adc: max1363: Export OF device ID table as module aliases 2017-01-22 13:21:30 +00:00
max11100.c iio: adc: tlc4541: add support for TI tlc4541 adc 2017-01-22 13:21:28 +00:00
mcp320x.c
mcp3422.c
men_z188_adc.c
meson_saradc.c iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs 2017-01-28 12:29:50 +00:00
mt6577_auxadc.c
mxs-lradc.c
nau7802.c
palmas_gpadc.c iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume 2017-01-21 14:26:03 +00:00
qcom-spmi-iadc.c
qcom-spmi-vadc.c iio:adc:qcom-spmi-vadc: use div64_s64 instead of direct 64 bit division. 2017-01-10 21:13:39 +00:00
rcar-gyroadc.c iio: adc: handle unknow of_device_id data 2017-02-05 09:30:15 +00:00
rockchip_saradc.c
stm32-adc-core.c iio: adc: stm32: add optional dma support 2017-01-29 12:49:17 +00:00
stm32-adc-core.h iio: adc: stm32: add optional dma support 2017-01-29 12:49:17 +00:00
stm32-adc.c iio: adc: stm32: add optional dma support 2017-01-29 12:49:17 +00:00
stx104.c iio: stx104: Add GPIO set_multiple callback function support 2017-02-01 18:50:54 +00:00
ti_am335x_adc.c iio: adc: ti_am335x_adc: fix fifo overrun recovery 2017-03-15 19:47:23 +00:00
ti-adc081c.c
ti-adc128s052.c
ti-adc161s626.c
ti-adc0832.c
ti-adc12138.c
ti-ads1015.c iio: adc: constify iio_info structures 2017-01-22 13:21:43 +00:00
ti-ads7950.c iio: adc: ti-ads7950: Change regulator matching string to "vref" 2017-01-15 13:56:08 +00:00
ti-ads8688.c
ti-tlc4541.c iio: adc: tlc4541: add support for TI tlc4541 adc 2017-01-22 13:21:28 +00:00
twl4030-madc.c
twl6030-gpadc.c
vf610_adc.c
viperboard_adc.c
xilinx-xadc-core.c iio: adc: xilinx: Fix error handling 2017-02-25 16:39:32 +00:00
xilinx-xadc-events.c
xilinx-xadc.h