From 505ce638f58fbbb20f4399ee6e31984042cb84a2 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Sun, 8 Aug 2010 16:05:55 +0200 Subject: [PATCH] openwrt: add chipselect line to bitbanged SPI interface --- .../patches/110.spi_gpio_enable_cs_line.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mote/v2/openwrt/patches/110.spi_gpio_enable_cs_line.patch diff --git a/mote/v2/openwrt/patches/110.spi_gpio_enable_cs_line.patch b/mote/v2/openwrt/patches/110.spi_gpio_enable_cs_line.patch new file mode 100644 index 0000000..db8c4ed --- /dev/null +++ b/mote/v2/openwrt/patches/110.spi_gpio_enable_cs_line.patch @@ -0,0 +1,19 @@ +--- /tmp/build_dir/linux-atheros/linux-2.6.30.10/arch/mips/ar231x/ar2315.c 2010-08-08 15:52:43.005477443 +0200 ++++ build_dir/linux-atheros/linux-2.6.30.10/arch/mips/ar231x/ar2315.c 2010-08-08 15:56:06.009475860 +0200 +@@ -407,6 +407,7 @@ + #define SPI_GPIO_SCK 3 + #define SPI_GPIO_MOSI 2 + #define SPI_GPIO_MISO 1 ++#define SPI_GPIO_CS 6 + + static struct spi_gpio_platform_data ar2315_spi_gpio_platform_data = { + .sck = SPI_GPIO_SCK, +@@ -426,7 +427,7 @@ + static struct spi_board_info ar2315_spi_gpio_board_info[] __initdata = { + { + .modalias = "spidev", +- .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT, ++ .controller_data = (void *) SPI_GPIO_CS, + .mode = SPI_MODE_0, + .max_speed_hz = 10000000, /* 10kHz */ + .bus_num = 0,