From e0d205e9914476e96596c5339fa440fb314ef03b Mon Sep 17 00:00:00 2001 From: Brian Niebuhr Date: Thu, 2 Sep 2010 16:52:06 +0530 Subject: 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 Tested-By: Michael Williamson Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/include/mach/spi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-davinci/include') 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 { u8 version; u8 num_chipselect; u8 clk_internal; + u8 intr_line; u8 use_dma; u8 *chip_sel; }; @@ -38,6 +39,9 @@ struct davinci_spi_config { u8 wdelay; u8 odd_parity; u8 parity_enable; +#define SPI_IO_TYPE_INTR 0 +#define SPI_IO_TYPE_POLL 1 + u8 io_type; u8 timer_disable; u8 c2tdelay; u8 t2cdelay; -- cgit v1.2.3