LKML Archive on
help / color / mirror / Atom feed
From: Nicolas Ferre <>
To: David Brownell <>
Cc: Haavard Skinnemoen <>,
	Patrice Vilchez <>,
	Linux Kernel list <>
Subject: Re: [PATCH] input/spi: add ads7843 support to ads7846 touchscreen driver
Date: Thu, 21 Dec 2006 15:40:11 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Nicolas Ferre a écrit :
>>> As the SPI underlying code behaves quite differently from a 
>>> controller driver
>>> to another whan not having a tx_buf filled, I have add a zerroed 
>>> buffer to give
>>> to the spi layer while receiving data.
>> You must be working with a buggy controller driver then.  That part of
>> this patch should never be needed.  It's expected that rx-only transfers
>> will omit a tx buf; all controller drivers must handle that case.
> I said that because it is true that most of spi controller drivers 
> manage rx only transactions filling the tx buffer with zerros but the 
> spi_s3c24xx.c driver seems to fill with ones (line 177 hw_txbyte())
> Anyway, I will check in our controller driver to sort this out.

I dug a bit into this.
Well, in the atmel_spi driver code, we use previous rx buffer if we do 
not provide a tx_buf (as it is said that in struct spi_transfer 
comments,  "If the transmit buffer is null, undefined data will be 
shifted out while filling rx_buf").
So, the touchscreen controller sees sometimes a "start" condition (bit 7 
of a control byte). It then takes the control byte and sets trash bits 
as a configuration. I ran into those troubles and add a zerroed buffer 
as tx.

Do you think that shifting zerros out when a tx_buf is not specified is 
the desired behavior ?

Nicolas Ferre

  reply	other threads:[~2006-12-21 14:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2006-12-20 23:13 ` David Brownell
2006-12-21 13:08   ` Nicolas Ferre
2006-12-21 14:40     ` Nicolas Ferre [this message]
2006-12-22 20:05       ` David Brownell
2006-12-22 19:31     ` David Brownell
2006-12-22 20:14       ` Dmitry Torokhov
2006-12-22 19:25 [patch 2.6.20-rc1 6/6] input: ads7846 directly senses PENUP state David Brownell
2006-12-28 22:37 ` David Brownell
2006-12-29  6:22   ` Dmitry Torokhov
2006-12-29 20:26     ` David Brownell
2007-02-16 17:37       ` [PATCH] input/spi: add ads7843 support to ads7846 touchscreen driver Nicolas Ferre
2007-02-16 19:08         ` David Brownell
2007-02-19 12:48           ` Nicolas Ferre
2007-02-19 18:46             ` David Brownell
2007-02-20  9:19               ` Nicolas Ferre
2007-03-01  4:49                 ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2006-12-15 14:45 Nicolas FERRE
2006-12-20 22:03 ` Andrew Morton
2006-12-21  9:57   ` Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] input/spi: add ads7843 support to ads7846 touchscreen driver' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).