linux/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
..
ad799x.c iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999 2016-08-15 15:39:14 +01:00
ad7266.c iio: devm_regulator_get_optional never returns NULL 2016-09-05 21:09:38 +01:00
ad7291.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ad7298.c iio: adc: ad7298: use iio helper function to guarantee direct mode 2016-07-24 19:58:42 +01:00
ad7476.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ad7766.c iio:adc: ad7766: testing the wrong variable in probe 2016-11-12 14:35:21 +00:00
ad7791.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ad7793.c iio: adc: ad7793: use iio helper function to guarantee direct mode 2016-07-24 19:58:41 +01:00
ad7887.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ad7923.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ad_sigma_delta.c
at91_adc.c iio: adc: at91: add suspend and resume callback 2016-11-05 16:33:00 +00:00
at91-sama5d2_adc.c Merge 4.6-rc7 into staging-next 2016-05-09 13:20:04 +02:00
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 iio: Add driver for Broadcom iproc-static-adc 2016-07-03 11:32:30 +01:00
berlin2-adc.c
cc10001_adc.c iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
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 iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
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 iio: adc: add NXP LPC18xx ADC driver 2016-03-12 18:11:48 +00:00
ltc2485.c iio: adc: ltc2485: add support for Linear Technology LTC2485 ADC 2016-08-29 16:57:40 +01:00
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 iio:max1027: Use iio_trigger_validate_own_device() helper 2016-09-27 20:33:00 +01:00
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 iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
mcp3422.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
men_z188_adc.c iio: adc: men_z188_adc: constify iio_info structures 2016-09-18 11:58:31 +01:00
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 iio: adc: mt2701: Add Mediatek auxadc driver for mt2701. 2016-08-21 19:54:30 +01:00
mxs-lradc.c iio: mxs-lradc: disable only masked channels in mxs_lradc_hw_stop 2016-05-04 10:44:28 +01:00
nau7802.c iio: adc: Use complete() instead of complete_all() 2016-08-15 18:01:27 +01:00
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 iio: adc: rockchip_saradc: reset saradc controller before programming it 2016-08-23 19:05:03 +01:00
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 iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ti-adc128s052.c iio: adc: add missing of_node references to iio_dev 2016-07-03 13:40:08 +01:00
ti-adc161s626.c iio: adc: ti-adc161s626: add regulator support 2016-09-27 20:33:03 +01:00
ti-adc0832.c iio: ti-adc0832: add triggered buffer support 2016-10-23 19:34:25 +01:00
ti-adc12138.c iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver 2016-08-31 18:10:36 +01:00
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 iio: devm_regulator_get_optional never returns NULL 2016-09-05 21:09:38 +01:00
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 iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
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 iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
xilinx-xadc.h