Hi,
I'm not sure this is the right mailinglist for my question, but I give
it a shot.

I'm working on a custom hardware running Linux kernel 2.6.32.3. The
hardware is based on the AT91SAM9263-ek evaluation board and have touch
screen attached to it. The touch screen controller is ads7846 and is
connected to SPI.

I'm in some trouble using the SPI (driver: atmel_spi).

ads7846 have two extra inputs that I want to use. The problem is that
when reading these inputs from sysfs I get a lot of zeroes when it
should read ( when no sensor is connected) ~3300 mV, e.g. 
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
3299 <-- This one is correct.
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0

I have measured the input and it's stable at 3.3V.

Do anyone know why I read so many zeroes?

I have made some printk in ads7846.c to trace the problem. It seemed to
read more correct values when I added the printks.

Thank you for the help,
Niclas

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to