Use resistive_adc_touch + other ADC

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

sbouvet
Posts: 4
Joined: Wed Aug 29, 2018 4:25 pm

Use resistive_adc_touch + other ADC

Wed Apr 08, 2020 10:59 pm

We would like to use the driver 'resistive_adc_touch' and other ADC inputs, but when the file '/dev/input/event0' is open all other ADC channels are locked. Who I can do to resolve my issue.
Regards

Step to reproduce:

Code: Select all

# lsmod
Module                  Size  Used by    Tainted: G
fb_ili9488             12288  0
...
spi_atmel              16384  0 [permanent]
resistive_adc_touch    12288  0

# cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
16352

# cat /dev/input/event0 &

# cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
cat: read error: Device or resource busy

# ps aux
PID   USER     COMMAND
    1 root     init
    2 root     [kthreadd]
...
  157 root     cat /dev/input/event0
  159 root     ps aux

# kill 157

# cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
16352
blue_z
Location: USA
Posts: 2077
Joined: Thu Apr 19, 2007 10:15 pm

Re: Use resistive_adc_touch + other ADC

Fri Apr 10, 2020 1:59 am

sbouvet wrote: We would like to use the driver 'resistive_adc_touch' and other ADC inputs, but when the file '/dev/input/event0' is open all other ADC channels are locked.
You neglect to mention any board, SoC, or Linux kernel version.
Anyway that's how that driver is intended to operate (apparently because of a HW limitation).
From the patch submitted to the mailing list:
If it's the case, [the ADC driver] will work in touchscreen mode, and will refuse to do usual analog-digital conversion, because we have a single trigger and the touchscreen needs it.
...
If the user attempts to use another trigger while there is a buffer that already requested the touchscreen channels
(thus the trigger), the driver will refuse to comply.


Regards

Return to “LINUX”

Who is online

Users browsing this forum: Google [Bot] and 3 guests