From patchwork Thu Apr 28 00:44:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 93133 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4E2BAB6EE8 for ; Thu, 28 Apr 2011 10:47:24 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QFFLr-0002OW-3d; Thu, 28 Apr 2011 00:45:03 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1QFFLp-00022i-56; Thu, 28 Apr 2011 00:45:01 +0000 Received: from mail-yx0-f177.google.com ([209.85.213.177]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QFFLb-000228-6s for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2011 00:44:47 +0000 Received: by yxh35 with SMTP id 35so750012yxh.36 for ; Wed, 27 Apr 2011 17:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=k3K7ZNbfIey/1Fk3W0iWna8AvtdisuEA6zXZRKvULrk=; b=wV1rcoeT7hnwBFafYLD4rKgFR2bMW75oOz8GELs/aQ1BI+VhIoQD6l5yK/ZFVfWw42 Tm/o8oVrnFN4w/jmpwNOPiLu2lSlsy7xfBNSFd+LTo01PHcMf/DMPqFJ7f7Q9D9Mqddk sxDIJqYqrAGsFhBJZevgqUvasNc2g/2TDqL84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Fl2rf3bsK2u06Uq5CMOOpwLo3n5z9eqMfa8D/rSStXsEessSL8dD7/qiFPGOBvJcDo 9E01KSs9FkYISM3GK27XRgR/3zymh+AREBGHLkKylkLAXRtYfjDu2G3hTcT4U6DoeTBx ATEdIbJL7fMLxMNqiBmu2TtDPdjo0fecc5EVc= Received: by 10.150.31.15 with SMTP id e15mr2508081ybe.185.1303951485735; Wed, 27 Apr 2011 17:44:45 -0700 (PDT) Received: from localhost.localdomain ([201.82.76.9]) by mx.google.com with ESMTPS id r21sm698325yba.15.2011.04.27.17.44.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2011 17:44:45 -0700 (PDT) From: Fabio Estevam To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: mx5/mx51_babbage: Use gpio_request_one when possible Date: Wed, 27 Apr 2011 21:44:32 -0300 Message-Id: <1303951472-22234-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1303951472-22234-1-git-send-email-festevam@gmail.com> References: <1303951472-22234-1-git-send-email-festevam@gmail.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110427_204447_344612_AC67D2CB X-CRM114-Status: GOOD ( 10.90 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (festevam[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Fabio Estevam , Fabio Estevam , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list 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+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Instead of using gpio_request followed by gpio_direction_output use gpio_request_one. Signed-off-by: Fabio Estevam --- arch/arm/mach-mx5/board-mx51_babbage.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 7b919bc..00203fb 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c @@ -179,25 +179,25 @@ static int gpio_usbh1_active(void) /* Set USBH1_STP to GPIO and toggle it */ mxc_iomux_v3_setup_pad(usbh1stp_gpio); - ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp"); + ret = gpio_request_one(BABBAGE_USBH1_STP, + GPIOF_OUT_INIT_LOW, "usbh1_stp"); if (ret) { pr_debug("failed to get MX51_PAD_USBH1_STP__GPIO_1_27: %d\n", ret); return ret; } - gpio_direction_output(BABBAGE_USBH1_STP, 0); gpio_set_value(BABBAGE_USBH1_STP, 1); msleep(100); gpio_free(BABBAGE_USBH1_STP); /* De-assert USB PHY RESETB */ - ret = gpio_request(BABBAGE_USB_PHY_RESET, "phy_reset"); + ret = gpio_request_one(BABBAGE_USB_PHY_RESET, + GPIOF_OUT_INIT_HIGH, "phy_reset"); if (ret) { pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret); return ret; } - gpio_direction_output(BABBAGE_USB_PHY_RESET, 1); return 0; }