From patchwork Wed Jul 20 05:56:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toshiharu Okada X-Patchwork-Id: 990312 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6K5vmEt021281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 20 Jul 2011 05:58:09 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.76) (envelope-from ) id 1QjPn0-0007KS-O6; Wed, 20 Jul 2011 05:57:46 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QjPmz-0007KN-PK for spi-devel-general@lists.sourceforge.net; Wed, 20 Jul 2011 05:57:45 +0000 X-ACL-Warn: Received: from sm-d311v.smileserver.ne.jp ([203.211.202.206]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1QjPmv-0003hu-ON for spi-devel-general@lists.sourceforge.net; Wed, 20 Jul 2011 05:57:45 +0000 X-Virus-Status: clean(F-Secure/virusgw_smtp/403/viruscheck1-00.private.hosting-pf.net) Received: from localhost.localdomain (113x35x143x224.ap113.ftth.ucom.ne.jp [113.35.143.224]) by sm-d311v.smileserver.ne.jp (mail) with ESMTPSA id 0628996DA4; Wed, 20 Jul 2011 14:57:33 +0900 (JST) From: Toshiharu Okada To: grant.likely@secretlab.ca, spi-devel-general@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] spi_topcliff_pch: supports a spi mode setup and bit order setup by IO control Date: Wed, 20 Jul 2011 14:56:54 +0900 Message-Id: <1311141414-12867-1-git-send-email-toshiharu-linux@dsn.okisemi.com> X-Mailer: git-send-email 1.7.4.4 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1QjPmv-0003hu-ON Cc: qi.wang@intel.com, yong.y.wang@intel.com, tomoya-linux@dsn.okisemi.com, Toshiharu Okada , kok.howg.ewe@intel.com, joel.clark@intel.com 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.6 (demeter1.kernel.org [140.211.167.41]); Wed, 20 Jul 2011 05:58:54 +0000 (UTC) This patch supports a spi mode setup and bit order setup by IO control. spi mode: mode 0 to mode 3 bit order: LSB first, MSB first Signed-off-by: Toshiharu Okada --- drivers/spi/spi_topcliff_pch.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi_topcliff_pch.c b/drivers/spi/spi_topcliff_pch.c index 79e48d4..dec83c9 100644 --- a/drivers/spi/spi_topcliff_pch.c +++ b/drivers/spi/spi_topcliff_pch.c @@ -1038,6 +1038,7 @@ static int pch_spi_probe(struct pci_dev *pdev, const struct pci_device_id *id) master->num_chipselect = PCH_MAX_CS; master->setup = pch_spi_setup; master->transfer = pch_spi_transfer; + master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; dev_dbg(&pdev->dev, "%s transfer member of SPI master initialized\n", __func__);