From patchwork Thu Jan 31 06:23:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2071161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 39F42DFB79 for ; Thu, 31 Jan 2013 06:27:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0nZg-0003vb-HA; Thu, 31 Jan 2013 06:24:40 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0nZC-0003mm-0G for linux-arm-kernel@lists.infradead.org; Thu, 31 Jan 2013 06:24:13 +0000 Received: from ayumi.akashicho.tokyo.vergenet.net (p8120-ipbfp1001kobeminato.hyogo.ocn.ne.jp [118.10.137.120]) by kirsty.vergenet.net (Postfix) with ESMTP id C697C25BF2F; Thu, 31 Jan 2013 17:24:07 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 6FE97EDE105; Thu, 31 Jan 2013 15:24:06 +0900 (JST) From: Simon Horman To: Arnd Bergmann , Olof Johansson Subject: [PATCH 1/9] ARM: shmobile: ag5evm: Use gpio_request_one() Date: Thu, 31 Jan 2013 15:23:54 +0900 Message-Id: <1359613442-26038-2-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au> References: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130131_012410_598603_568CEDD6 X-CRM114-Status: GOOD ( 12.58 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [202.4.237.240 listed in list.dnswl.org] -0.7 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: Laurent Pinchart , linux-sh@vger.kernel.org, Magnus Damm , arm@kernel.org, Simon Horman , linux-arm-kernel@lists.infradead.org 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 From: Laurent Pinchart Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ag5evm.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 032d108..5e7fe15 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c @@ -479,11 +479,10 @@ static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) static int power_gpio = -EINVAL; if (power_gpio < 0) { - int ret = gpio_request(GPIO_PORT114, "sdhi1_power"); - if (!ret) { + int ret = gpio_request_one(GPIO_PORT114, GPIOF_OUT_INIT_LOW, + "sdhi1_power"); + if (!ret) power_gpio = GPIO_PORT114; - gpio_direction_output(power_gpio, 0); - } } /* @@ -604,14 +603,11 @@ static void __init ag5evm_init(void) gpio_request(GPIO_FN_MMCD0_5_PU, NULL); gpio_request(GPIO_FN_MMCD0_6_PU, NULL); gpio_request(GPIO_FN_MMCD0_7_PU, NULL); - gpio_request(GPIO_PORT208, NULL); /* Reset */ - gpio_direction_output(GPIO_PORT208, 1); + gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */ /* enable SMSC911X */ - gpio_request(GPIO_PORT144, NULL); /* PINTA2 */ - gpio_direction_input(GPIO_PORT144); - gpio_request(GPIO_PORT145, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT145, 1); + gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */ + gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */ /* FSI A */ gpio_request(GPIO_FN_FSIACK, NULL); @@ -626,15 +622,13 @@ static void __init ag5evm_init(void) gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL); /* LCD panel */ - gpio_request(GPIO_PORT217, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT217, 0); + gpio_request_one(GPIO_PORT217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ mdelay(1); gpio_set_value(GPIO_PORT217, 1); mdelay(100); /* LCD backlight controller */ - gpio_request(GPIO_PORT235, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT235, 0); + gpio_request_one(GPIO_PORT235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ lcd_backlight_set_brightness(0); /* enable SDHI0 on CN15 [SD I/F] */