diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-01 02:53:25 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-09 00:37:38 +0100 |
commit | 4e9daaca8d265151789c78a695ffdc774d2af850 (patch) | |
tree | 627f73622d0c0a9d318726efb094badb807f41ba /drivers/mfd/omap-usb-host.c | |
parent | mfd: Use gpio_request_one from dm355evm_msp (diff) | |
download | linux-4e9daaca8d265151789c78a695ffdc774d2af850.tar.xz linux-4e9daaca8d265151789c78a695ffdc774d2af850.zip |
mfd: Use gpio_request_one from omap-usb-host
Use gpio_request_one() instead of multiple gpiolib calls.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/omap-usb-host.c')
-rw-r--r-- | drivers/mfd/omap-usb-host.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 86e14583a082..6533ecc71678 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); |