From patchwork Tue Jun 28 12:49:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 924702 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5SCpsoM000807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 28 Jun 2011 12:52:16 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbXkf-0003x9-3h; Tue, 28 Jun 2011 12:50:51 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QbXkd-0000co-A1; Tue, 28 Jun 2011 12:50:47 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbXkA-0000TI-6g for linux-arm-kernel@canuck.infradead.org; Tue, 28 Jun 2011 12:50:18 +0000 Received: from mail-wy0-f177.google.com ([74.125.82.177]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbXk7-00049V-6J for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2011 12:50:16 +0000 Received: by wyf23 with SMTP id 23so137670wyf.36 for ; Tue, 28 Jun 2011 05:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=UMJc49TCkIQsDGimb+nSEwl0DMdLj+HQst5wIOyliS8=; b=aYWXZk356RfPUUhRaqhlFYyDVhMo1W2s6ecMLrSK/cM1SSnQPCRtT4InOlQRrZixvB /NAEKCVu3f2yRRB1AJl0pBilehIVthIB/gFsDYQOfgwDuXJHrxjjxj5zyOMWnjUYx7qf 1sPWbDsZxx+UNcHiTEulQOJutXrbMz59VBqto= Received: by 10.227.128.81 with SMTP id j17mr6582486wbs.55.1309265363928; Tue, 28 Jun 2011 05:49:23 -0700 (PDT) Received: from macbook.be.48ers.dk (191.207-78-194.adsl-fix.skynet.be [194.78.207.191]) by mx.google.com with ESMTPS id gg16sm137127wbb.17.2011.06.28.05.49.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 05:49:23 -0700 (PDT) Received: by macbook.be.48ers.dk (Postfix, from userid 1000) id E0A687DC58; Tue, 28 Jun 2011 14:49:20 +0200 (CEST) From: Peter Korsgaard To: ben-linux@fluff.org, grant.likely@secretlab.ca, linux-arm-kernel@lists.infradead.org, spi-devel-general@lists.sourceforge.net Subject: [PATCH 2/5] mach-qt2410: convert to spi_gpio Date: Tue, 28 Jun 2011 14:49:14 +0200 Message-Id: <1309265357-15879-3-git-send-email-jacmet@sunsite.dk> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309265357-15879-1-git-send-email-jacmet@sunsite.dk> References: <1309265357-15879-1-git-send-email-jacmet@sunsite.dk> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110628_135015_673670_814D4111 X-CRM114-Status: GOOD ( 16.75 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2-r929478 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jacmet[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Peter Korsgaard X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 28 Jun 2011 12:52:16 +0000 (UTC) Rather than the deprecated spi_s3c24xx_gpio driver. Only compile tested. Notice that the board support seems quite broken as the spi_s3c24xx_gpio platform device name was misspelled and there is no struct spi_board_info defined, but this atleast didn't make it any worse. Signed-off-by: Peter Korsgaard --- arch/arm/mach-s3c2410/mach-qt2410.c | 34 ++++++++-------------------------- 1 files changed, 8 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index e8f49fe..f44f775 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,8 +53,6 @@ #include #include #include -#include -#include #include #include @@ -216,32 +214,16 @@ static struct platform_device qt2410_led = { /* SPI */ -static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs) -{ - switch (cs) { - case BITBANG_CS_ACTIVE: - gpio_set_value(S3C2410_GPB(5), 0); - break; - case BITBANG_CS_INACTIVE: - gpio_set_value(S3C2410_GPB(5), 1); - break; - } -} - -static struct s3c2410_spigpio_info spi_gpio_cfg = { - .pin_clk = S3C2410_GPG(7), - .pin_mosi = S3C2410_GPG(6), - .pin_miso = S3C2410_GPG(5), - .chip_select = &spi_gpio_cs, +static struct spi_gpio_platform_data spi_gpio_cfg = { + .sck = S3C2410_GPG(7), + .mosi = S3C2410_GPG(6), + .miso = S3C2410_GPG(5), }; - static struct platform_device qt2410_spi = { - .name = "s3c24xx-spi-gpio", - .id = 1, - .dev = { - .platform_data = &spi_gpio_cfg, - }, + .name = "spi-gpio", + .id = 1, + .dev.platform_data = &spi_gpio_cfg, }; /* Board devices */