From patchwork Wed Jul 18 11:28:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 1210561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 668923FD4F for ; Wed, 18 Jul 2012 11:39:00 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SrSUL-0001ho-BH; Wed, 18 Jul 2012 11:32:17 +0000 Received: from opensource.wolfsonmicro.com ([80.75.67.52]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SrSQv-0000nR-AK for linux-arm-kernel@lists.infradead.org; Wed, 18 Jul 2012 11:28:48 +0000 Received: from finisterre.wolfsonmicro.main (unknown [87.246.78.26]) by opensource.wolfsonmicro.com (Postfix) with ESMTPSA id 3ED911109F9; Wed, 18 Jul 2012 12:28:43 +0100 (BST) Received: from broonie by finisterre.wolfsonmicro.main with local (Exim 4.80) (envelope-from ) id 1SrSQs-0008Ka-Gd; Wed, 18 Jul 2012 12:28:42 +0100 From: Mark Brown To: Grant Likely , Kukjin Kim Subject: [PATCH 2/4] spi/s3c64xx: Put the /CS GPIO into output mode Date: Wed, 18 Jul 2012 12:28:39 +0100 Message-Id: <1342610921-31986-2-git-send-email-broonie@opensource.wolfsonmicro.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1342610921-31986-1-git-send-email-broonie@opensource.wolfsonmicro.com> References: <1342610921-31986-1-git-send-email-broonie@opensource.wolfsonmicro.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: spi-devel-general@lists.sourceforge.net, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Brown X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org No call was being made by the GPIO driver to put the GPIO into output mode meaning that the calls to gpio_set_value() which were being done were not valid. A similar issue appears to exist with the DT GPIO requests but as they appear to be being used for pinmux it's less clear to me that we want to configure them. Without this fix Cragganmore systems can't talk to their SPI devices. Signed-off-by: Mark Brown --- drivers/spi/spi-s3c64xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 7258b18..6ed3ba8 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -892,7 +892,8 @@ static int s3c64xx_spi_setup(struct spi_device *spi) } if (!spi_get_ctldata(spi)) { - err = gpio_request(cs->line, dev_name(&spi->dev)); + err = gpio_request_one(cs->line, GPIOF_OUT_INIT_HIGH, + dev_name(&spi->dev)); if (err) { dev_err(&spi->dev, "Failed to get /CS gpio [%d]: %d\n",