All of lore.kernel.org
 help / color / mirror / Atom feed
* + spi_s3c2410_gpioc-spi-mode-2-and-3-support.patch added to -mm tree
@ 2007-02-17  1:47 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-17  1:47 UTC (permalink / raw)
  To: mm-commits; +Cc: laforge, ben-linux, dbrownell


The patch titled
     spi_s3c2410_gpio.c spi mode 2 and 3 support
has been added to the -mm tree.  Its filename is
     spi_s3c2410_gpioc-spi-mode-2-and-3-support.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: spi_s3c2410_gpio.c spi mode 2 and 3 support
From: Harald Welte <laforge@openmoko.org>

Add transfer modes 2 and 3 to the S3C24XX gpio SPI driver

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/spi/spi_s3c24xx_gpio.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -puN drivers/spi/spi_s3c24xx_gpio.c~spi_s3c2410_gpioc-spi-mode-2-and-3-support drivers/spi/spi_s3c24xx_gpio.c
--- a/drivers/spi/spi_s3c24xx_gpio.c~spi_s3c2410_gpioc-spi-mode-2-and-3-support
+++ a/drivers/spi/spi_s3c24xx_gpio.c
@@ -73,6 +73,19 @@ static u32 s3c2410_spigpio_txrx_mode1(st
 	return bitbang_txrx_be_cpha1(spi, nsecs, 0, word, bits);
 }
 
+static u32 s3c2410_spigpio_txrx_mode2(struct spi_device *spi,
+				      unsigned nsecs, u32 word, u8 bits)
+{
+	return bitbang_txrx_be_cpha0(spi, nsecs, 1, word, bits);
+}
+
+static u32 s3c2410_spigpio_txrx_mode3(struct spi_device *spi,
+				      unsigned nsecs, u32 word, u8 bits)
+{
+	return bitbang_txrx_be_cpha1(spi, nsecs, 1, word, bits);
+}
+
+
 static void s3c2410_spigpio_chipselect(struct spi_device *dev, int value)
 {
 	struct s3c2410_spigpio *sg = spidev_to_sg(dev);
@@ -108,6 +121,8 @@ static int s3c2410_spigpio_probe(struct 
 
 	sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;
 	sp->bitbang.txrx_word[SPI_MODE_1] = s3c2410_spigpio_txrx_mode1;
+	sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2;
+	sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3;
 
 	/* set state of spi pins */
 	s3c2410_gpio_setpin(sp->info->pin_clk, 0);
_

Patches currently in -mm which might be from laforge@openmoko.org are

spi_s3c2410_gpioc-spi-mode-2-and-3-support.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-17  1:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-17  1:47 + spi_s3c2410_gpioc-spi-mode-2-and-3-support.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.