From patchwork Fri Mar 29 02:43:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2363071 Return-Path: X-Original-To: patchwork-ltsi-dev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by patchwork1.kernel.org (Postfix) with ESMTP id 4AF7C3FD40 for ; Fri, 29 Mar 2013 02:56:41 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [IPv6:::1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A00E9E05; Fri, 29 Mar 2013 02:47:44 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTP id E2459B3F for ; Fri, 29 Mar 2013 02:47:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kirsty.vergenet.net (kirsty.vergenet.net [202.4.237.240]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 100B72017F for ; Fri, 29 Mar 2013 02:47:36 +0000 (UTC) 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 C548D2C6A78; Fri, 29 Mar 2013 13:45:58 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 69A1DEDEA33; Fri, 29 Mar 2013 11:45:57 +0900 (JST) From: Simon Horman To: ltsi-dev@lists.linuxfoundation.org Date: Fri, 29 Mar 2013 11:43:51 +0900 Message-Id: <1364525119-31791-303-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364525119-31791-1-git-send-email-horms+renesas@verge.net.au> References: <1364525119-31791-1-git-send-email-horms+renesas@verge.net.au> X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Magnus Damm Subject: [LTSI-dev] [PATCH/RFC 302/390] ARM: shmobile: mackerel: Use gpio_request_one() X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.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 (cherry picked from commit f96be91ad23f44df9ab2e3370e42e2515ea59481) Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-mackerel.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 8969a03..ed05efa 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -1446,11 +1446,10 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_LCDDISP, NULL); gpio_request(GPIO_FN_LCDDCK, NULL); - gpio_request(GPIO_PORT31, NULL); /* backlight */ - gpio_direction_output(GPIO_PORT31, 0); /* off by default */ + /* backlight, off by default */ + gpio_request_one(GPIO_PORT31, GPIOF_OUT_INIT_LOW, NULL); - gpio_request(GPIO_PORT151, NULL); /* LCDDON */ - gpio_direction_output(GPIO_PORT151, 1); + gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ /* USBHS0 */ gpio_request(GPIO_FN_VBUS0_0, NULL); @@ -1466,8 +1465,7 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_FSIAILR, NULL); gpio_request(GPIO_FN_FSIAISLD, NULL); gpio_request(GPIO_FN_FSIAOSLD, NULL); - gpio_request(GPIO_PORT161, NULL); - gpio_direction_output(GPIO_PORT161, 0); /* slave */ + gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ gpio_request(GPIO_PORT9, NULL); gpio_request(GPIO_PORT10, NULL); @@ -1518,8 +1516,7 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_SDHID1_0, NULL); #endif /* card detect pin for MMC slot (CN7) */ - gpio_request(GPIO_PORT41, NULL); - gpio_direction_input(GPIO_PORT41); + gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL); /* enable SDHI2 */ gpio_request(GPIO_FN_SDHICMD2, NULL); @@ -1530,8 +1527,7 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_SDHID2_0, NULL); /* card detect pin for microSD slot (CN23) */ - gpio_request(GPIO_PORT162, NULL); - gpio_direction_input(GPIO_PORT162); + gpio_request_one(GPIO_PORT162, GPIOF_IN, NULL); /* MMCIF */ gpio_request(GPIO_FN_MMCD0_0, NULL);