From patchwork Tue Apr 6 10:39:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Tereshonkov X-Patchwork-Id: 90773 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o36Ae5fZ004871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 6 Apr 2010 10:40:42 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nz6CS-0004R3-FM; Tue, 06 Apr 2010 10:40:04 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nz6CR-0004Qt-Db for spi-devel-general@lists.sourceforge.net; Tue, 06 Apr 2010 10:40:03 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of nokia.com designates 192.100.122.233 as permitted sender) client-ip=192.100.122.233; envelope-from=roman.tereshonkov@nokia.com; helo=mgw-mx06.nokia.com; Received: from smtp.nokia.com ([192.100.122.233] helo=mgw-mx06.nokia.com) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Nz6CP-0004T0-V4 for spi-devel-general@lists.sourceforge.net; Tue, 06 Apr 2010 10:40:03 +0000 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o36Adddm023672; Tue, 6 Apr 2010 13:39:53 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 6 Apr 2010 13:39:51 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 6 Apr 2010 13:39:50 +0300 Received: from localhost.localdomain (ramses.research.nokia.com [172.21.51.130]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o36AdnpM024910; Tue, 6 Apr 2010 13:39:50 +0300 From: Roman Tereshonkov To: spi-devel-general@lists.sourceforge.net Date: Tue, 6 Apr 2010 13:39:48 +0300 Message-Id: <1270550389-30392-1-git-send-email-roman.tereshonkov@nokia.com> X-Mailer: git-send-email 1.6.2.rc1.3.g81d3f X-OriginalArrivalTime: 06 Apr 2010 10:39:50.0852 (UTC) FILETIME=[7C676040:01CAD575] X-Nokia-AV: Clean X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1Nz6CP-0004T0-V4 Cc: Roman Tereshonkov Subject: [spi-devel-general] [PATCH 1/2] spi: Add support for dma_min_bytes configuration. X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 06 Apr 2010 10:40:42 +0000 (UTC) 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: