aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBrian Niebuhr <bniebuhr@efjohnson.com>2010-09-02 07:22:06 -0400
committerSekhar Nori <nsekhar@ti.com>2010-11-18 08:08:30 -0500
commite0d205e9914476e96596c5339fa440fb314ef03b (patch)
tree73e66099f725499b8adb145b8835d90add228c8e /arch
parent839c996ca8dd56f9ea80d7fc0c8b18b01394c82a (diff)
spi: davinci: add support for interrupt mode
Add support for SPI interrupt mode operation. Define a per chip-select "io type" variable which specifies if the transfers on this chip-select should happen in interrupt mode or polled mode. Introduce a new function davinci_spi_process_events() to help consolidate the code between interrupt mode processing and polled mode processing. Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com> Tested-By: Michael Williamson <michael.williamson@criticallink.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/include/mach/spi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/spi.h b/arch/arm/mach-davinci/include/mach/spi.h
index e68afe23885b..ab45b89a0c5f 100644
--- a/arch/arm/mach-davinci/include/mach/spi.h
+++ b/arch/arm/mach-davinci/include/mach/spi.h
@@ -30,6 +30,7 @@ struct davinci_spi_platform_data {
30 u8 version; 30 u8 version;
31 u8 num_chipselect; 31 u8 num_chipselect;
32 u8 clk_internal; 32 u8 clk_internal;
33 u8 intr_line;
33 u8 use_dma; 34 u8 use_dma;
34 u8 *chip_sel; 35 u8 *chip_sel;
35}; 36};
@@ -38,6 +39,9 @@ struct davinci_spi_config {
38 u8 wdelay; 39 u8 wdelay;
39 u8 odd_parity; 40 u8 odd_parity;
40 u8 parity_enable; 41 u8 parity_enable;
42#define SPI_IO_TYPE_INTR 0
43#define SPI_IO_TYPE_POLL 1
44 u8 io_type;
41 u8 timer_disable; 45 u8 timer_disable;
42 u8 c2tdelay; 46 u8 c2tdelay;
43 u8 t2cdelay; 47 u8 t2cdelay;