[RESEND] [PATCH] ADS5121 Fix: put dummy byte to enable fixing EOF bug to first place in order not to break some drivers\nUse ALARM interrupt to avoid waiting for data to come in

Josh Boyer jwboyer at linux.vnet.ibm.com
Fri Dec 12 05:46:35 EST 2008


On Thu, 11 Dec 2008 19:39:21 +0100
Matteo Fortini <m.fortini at selcomgroup.com> wrote:

> 
> This patch is to avoid breaking some drivers, in my case the ADS7846 
> touchscreen one, which use 1 char messages.
> If you put the dummy byte after the 1 char message, you get part of the 
> answer to the message in the rxbuf of the message, which is thrown away.
> 
> The solution is to put the dummy byte before the message, so that the 
> slave doesn't respond.
> 
> It also optimizes the interrupt handling, by using the alarm function of 
> the FIFO, to wait until the rx FIFO has received enough bytes, instead 
> of waiting until the tx FIFO is empty.
> 
> 
> 
> Signed-off-by: Matteo Fortini <m.fortini at selcomgroup.com>
> ---
>  drivers/spi/mpc512x_psc_spi.c |   50 
> +++++++++++++++++++++++-----------------
>  1 files changed, 29 insertions(+), 21 deletions(-)

This still seems to be whitespace corrupted.  Also, that file doesn't
even exist in any upstream kernel I can find.  What tree did you diff
this from?

josh



More information about the Linuxppc-dev mailing list