From patchwork Wed Oct 15 13:00:47 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Ocker X-Patchwork-Id: 4598 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id BB404DE535 for ; Thu, 16 Oct 2008 01:18:22 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org X-Greylist: delayed 4630 seconds by postgrey-1.31 at ozlabs; Thu, 16 Oct 2008 01:18:04 EST Received: from bes.recconet.de (bes.recconet.de [87.106.167.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8A9EADDD01 for ; Thu, 16 Oct 2008 01:18:04 +1100 (EST) Received: from trinity.recco.de (trinity.intern.recconet.de [192.168.11.241]) by bes.recconet.de (8.13.8/8.13.8/Recconet-2008030801) with ESMTP id m9FCxW9q009138 for ; Wed, 15 Oct 2008 14:59:32 +0200 Received: from [172.16.135.104] (galileo.recco.de [172.16.135.104]) (authenticated bits=0) by trinity.recco.de (8.13.1/8.13.1/Reccoware-2005061101) with ESMTP id m9FD0lwD017750 for ; Wed, 15 Oct 2008 15:00:47 +0200 Subject: [PATCH] powerpc: SPI: specify chip select active high From: Wolfgang Ocker To: linuxppc-dev@ozlabs.org Organization: Reccoware Systems Date: Wed, 15 Oct 2008 15:00:47 +0200 Message-Id: <1224075647.4022.33.camel@galileo.recco.de> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-5.fc8) X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org The patch allows to specify that an SPI device needs an active high chip select. Signed-off-by: Wolfgang Ocker --- linux-2.6.27-rc7/drivers/of/of_spi.c.of_spi_cshigh 2008-09-22 00:29:55.000000000 +0200 +++ linux-2.6.27-rc7/drivers/of/of_spi.c 2008-09-29 13:43:06.000000000 +0200 @@ -61,6 +61,8 @@ spi->mode |= SPI_CPHA; if (of_find_property(nc, "spi-cpol", NULL)) spi->mode |= SPI_CPOL; + if (of_find_property(nc, "spi-cs-high", NULL)) + spi->mode |= SPI_CS_HIGH; /* Device speed */ prop = of_get_property(nc, "spi-max-frequency", &len); --- linux-2.6.27-rc7/Documentation/powerpc/booting-without-of.txt.of_spi_cshigh 2008-09-29 14:14:08.000000000 +0200 +++ linux-2.6.27-rc7/Documentation/powerpc/booting-without-of.txt 2008-09-29 14:24:26.000000000 +0200 @@ -1917,6 +1917,8 @@ inverse clock polarity (CPOL) mode - spi-cpha - (optional) Empty property indicating device requires shifted clock phase (CPHA) mode + - spi-cs-high - (optional) Empty property indicating device requires + chip select active high SPI example for an MPC5200 SPI bus: spi@f00 {