AW: [PATCH] iio: adc: at91: disable adc channel interrupt in timeout case

2019-02-04 Thread Georg Ottinger
The following is the patch that we are using internally to workaround the issues - I first wanted to publish the timeout/systemhang patch, because I don't have the feeling that our workaround is suitable to be mainlined: static int at91_adc_read_raw(struct iio_dev *idev,

AW: [PATCH] iio: adc: at91: disable adc channel interrupt in timeout case

2019-02-04 Thread Georg Ottinger
I don't know how the race condition is triggered in detail. All I know is that if Touch Acquisition is enabled the adc_demo_error2 will provoke a systemhang. If Touch is disabled the issue goes away. The architecture of at91_adc.c uses (at least) two trigger mechanisms of the ADC peripheral: To

AW: [PATCH] iio: adc: at91: disable adc channel interrupt in timeout case

2019-02-03 Thread Georg Ottinger
Actually this issue occurred to us with an concrete product, where we experienced a system hang at -20 °C. It was triggered by a race condition between the Touch Trigger and the Channel Trigger of the ADC. Once triggered we got in to the situation where an ongoing Channel Conversion was lost (Ti