We just recently mainlined this driver and it is there since kernel version 5.1. Unfortunately there where some bugs in the driver. The patches to solve them are at the moment in the process to go into mainline and also stable. Let me list those patches for you so we get a better overview:
In mainline repo the following patches add functionality of the stmpe-adc driver:
Patch 1: 270a60bcc8 dt-bindings: stmpe: Reformatting parameter list and use tabs only
Patch 2: 063755ab1d mfd: stmpe: Move ADC related defines to MFD header
Patch 3: 6377cfa3b8 mfd: stmpe: Preparations for STMPE ADC driver
Patch 4: 88f29d0f2c Input: stmpe-ts: preparations for STMPE ADC driver
Patch 5: 9f3d084965 iio: adc: add STMPE ADC driver using IIO framework
Patch 6: 81cdab7981 iio: adc: add STMPE ADC devicetree bindings
Patch 7: a822029a0c ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules
The fixes that will appear in mainline kernel version 5.3 are in the iio-repository
Bugfix1: b1f4c9a3c7 iio: stmpe-adc: Remove unnecessary assignment
Bugfix2: 2abd293703 iio: stmpe-adc: Add compatible name
Bugfix3: 263d21cd5e iio: stmpe-adc: Reinit completion struct on begin conversion
Bugfix4: 4bd44bb2b4 iio: stmpe-adc: Enable all stmpe-adc interrupts just once
Bugfix5: e813dde6f8 iio: stmpe-adc: Use wait_for_completion_timeout
Bugfix6: ed1f310ee2 iio: stmpe-adc: Reset possible interrupts
The toradex version of it just dont enable it by default.
Bugfix2 is solving that problem. It will be loaded by default if it is used in devicetree.
I quickly tried to port the driver from mainline but failed for now because i dont now hot to debug it except dmesg which wont show anything.
The Patch series 1-7 I listed above should apply cleanly to mainline since at least version 4.19.