From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Keshava Munegowda <keshava_mgowda@ti.com>,
Samuel Ortiz <sameo@linux.intel.com>
Subject: [PATCH 3/4] mfd: omap-usb-host: Use gpio_request_one
Date: Thu, 01 Dec 2011 09:53:25 +0800 [thread overview]
Message-ID: <1322704405.11560.7.camel@phoenix> (raw)
In-Reply-To: <1322704074.11560.3.camel@phoenix>
Use gpio_request_one() instead of multiple gpiolib calls.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/omap-usb-host.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 86e1458..6533ecc 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -715,19 +715,13 @@ static int usbhs_enable(struct device *dev)
clk_enable(omap->usbtll_ick);
if (pdata->ehci_data->phy_reset) {
- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) {
- gpio_request(pdata->ehci_data->reset_gpio_port[0],
- "USB1 PHY reset");
- gpio_direction_output
- (pdata->ehci_data->reset_gpio_port[0], 0);
- }
+ if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
+ gpio_request_one(pdata->ehci_data->reset_gpio_port[0],
+ GPIOF_OUT_INIT_LOW, "USB1 PHY reset");
- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) {
- gpio_request(pdata->ehci_data->reset_gpio_port[1],
- "USB2 PHY reset");
- gpio_direction_output
- (pdata->ehci_data->reset_gpio_port[1], 0);
- }
+ if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
+ gpio_request_one(pdata->ehci_data->reset_gpio_port[1],
+ GPIOF_OUT_INIT_LOW, "USB2 PHY reset");
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(10);
--
1.7.5.4
next prev parent reply other threads:[~2011-12-01 1:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 1:47 [PATCH 1/4] mfd: aat2870-core: Use gpio_request_one Axel Lin
2011-12-01 1:49 ` [PATCH 2/4] mfd: dm355evm_msp: " Axel Lin
2011-12-01 1:53 ` Axel Lin [this message]
2011-12-01 8:02 ` [PATCH 3/4] mfd: omap-usb-host: " Igor Grinberg
2011-12-01 1:55 ` [PATCH 4/4] mfd: twl6040-core: " Axel Lin
2011-12-01 8:02 ` Igor Grinberg
2011-12-01 8:18 ` Axel Lin
2011-12-01 9:10 ` Igor Grinberg
2011-12-01 8:38 ` [PATCH 1/4] mfd: aat2870-core: " Jinyoung Park
2011-12-19 11:13 ` Samuel Ortiz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322704405.11560.7.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=keshava_mgowda@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.