From: Imre Deak <[EMAIL PROTECTED]>
Date:  Fri May 26 16:30:10 2006 -0700

Input: ads7846: select correct SPI mode
    
Talk to ADS7846 chip using SPI mode 1, which is what the chip
supports:  writes on falling clock edge, reads on rising.

Signed-off-by: Imre Deak <[EMAIL PROTECTED]>
Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
Signed-off-by: David Brownell <[EMAIL PROTECTED]>

Index: osk/drivers/input/touchscreen/ads7846.c
===================================================================
--- osk.orig/drivers/input/touchscreen/ads7846.c        2006-12-22 
11:08:45.000000000 -0800
+++ osk/drivers/input/touchscreen/ads7846.c     2006-12-22 11:08:46.000000000 
-0800
@@ -773,6 +773,10 @@ static int __devinit ads7846_probe(struc
         * may not.  So we stick to very-portable 8 bit words, both RX and TX.
         */
        spi->bits_per_word = 8;
+       spi->mode = SPI_MODE_1;
+       err = spi_setup(spi);
+       if (err < 0)
+               return err;
 
        ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);
        input_dev = input_allocate_device();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to