linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Getting alot of zero values from ads7846 using atmel_spi
@ 2011-03-08  9:44 Niclas Karlsson
  2011-03-10 14:41 ` David Lamparter
  0 siblings, 1 reply; 6+ messages in thread
From: Niclas Karlsson @ 2011-03-08  9:44 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-20 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08  9:44 Getting alot of zero values from ads7846 using atmel_spi Niclas Karlsson
2011-03-10 14:41 ` David Lamparter
     [not found]   ` <20110310144145.GB4093601-sd4rSCkhOesKVZNVnti56SRbHCANfdcW@public.gmane.org>
2011-04-18  9:21     ` Niclas Karlsson
2011-04-19 20:40       ` Kenneth Heitke
     [not found]         ` <4DADF35B.2000600-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-04-20 14:34           ` Niclas Karlsson
2011-04-20 21:11             ` Kenneth Heitke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).