diff mbox

[1/2] spi: Add support for dma_min_bytes configuration.

Message ID 1270550389-30392-1-git-send-email-roman.tereshonkov@nokia.com (mailing list archive)
State Superseded
Headers show

Commit Message

Roman Tereshonkov April 6, 2010, 10:39 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index b76f246..5bf7992 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -347,6 +347,7 @@  struct spi_device *spi_new_device(struct spi_master *master,
 	proxy->max_speed_hz = chip->max_speed_hz;
 	proxy->mode = chip->mode;
 	proxy->irq = chip->irq;
+	proxy->dma_min_bytes = chip->dma_min_bytes;
 	strlcpy(proxy->modalias, chip->modalias, sizeof(proxy->modalias));
 	proxy->dev.platform_data = (void *) chip->platform_data;
 	proxy->controller_data = chip->controller_data;
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 97b60b3..4e9961d 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -84,6 +84,7 @@  struct spi_device {
 #define	SPI_NO_CS	0x40			/* 1 dev/bus, no chipselect */
 #define	SPI_READY	0x80			/* slave pulls low to pause */
 	u8			bits_per_word;
+	int			dma_min_bytes;
 	int			irq;
 	void			*controller_state;
 	void			*controller_data;
@@ -727,6 +728,8 @@  struct spi_board_info {
 	 */
 	u8		mode;
 
+	/* dma_min_bytes defines minimum bytes when dma is used */
+	u32		dma_min_bytes;
 	/* ... may need additional spi_device chip config data here.
 	 * avoid stuff protocol drivers can set; but include stuff
 	 * needed to behave without being bound to a driver: