mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-10 13:28:44 +00:00
USB: ehci-omap: Remove PHY regulator handling code
PHY regulator handling must be done in the PHY driver Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
87425ad363
commit
218a214723
@ -43,7 +43,6 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/usb/ulpi.h>
|
#include <linux/usb/ulpi.h>
|
||||||
#include <linux/regulator/consumer.h>
|
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
@ -112,19 +111,6 @@ static int omap_ehci_init(struct usb_hcd *hcd)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disable_put_regulator(
|
|
||||||
struct usbhs_omap_platform_data *pdata)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
|
|
||||||
if (pdata->regulator[i]) {
|
|
||||||
regulator_disable(pdata->regulator[i]);
|
|
||||||
regulator_put(pdata->regulator[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* configure so an HC device and id are always provided */
|
/* configure so an HC device and id are always provided */
|
||||||
/* always called with process context; sleeping is OK */
|
/* always called with process context; sleeping is OK */
|
||||||
|
|
||||||
@ -152,7 +138,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
|
|||||||
int ret = -ENODEV;
|
int ret = -ENODEV;
|
||||||
int irq;
|
int irq;
|
||||||
int i;
|
int i;
|
||||||
char supply[7];
|
|
||||||
struct omap_hcd *omap;
|
struct omap_hcd *omap;
|
||||||
|
|
||||||
if (usb_disabled())
|
if (usb_disabled())
|
||||||
@ -213,23 +198,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
|
|||||||
usb_phy_set_suspend(omap->phy[i], 0);
|
usb_phy_set_suspend(omap->phy[i], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get ehci regulator and enable */
|
|
||||||
for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
|
|
||||||
if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) {
|
|
||||||
pdata->regulator[i] = NULL;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
snprintf(supply, sizeof(supply), "hsusb%d", i);
|
|
||||||
pdata->regulator[i] = regulator_get(dev, supply);
|
|
||||||
if (IS_ERR(pdata->regulator[i])) {
|
|
||||||
pdata->regulator[i] = NULL;
|
|
||||||
dev_dbg(dev,
|
|
||||||
"failed to get ehci port%d regulator\n", i);
|
|
||||||
} else {
|
|
||||||
regulator_enable(pdata->regulator[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pm_runtime_enable(dev);
|
pm_runtime_enable(dev);
|
||||||
pm_runtime_get_sync(dev);
|
pm_runtime_get_sync(dev);
|
||||||
|
|
||||||
@ -255,7 +223,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_pm_runtime:
|
err_pm_runtime:
|
||||||
disable_put_regulator(pdata);
|
|
||||||
pm_runtime_put_sync(dev);
|
pm_runtime_put_sync(dev);
|
||||||
|
|
||||||
err_phy:
|
err_phy:
|
||||||
@ -286,7 +253,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
usb_remove_hcd(hcd);
|
usb_remove_hcd(hcd);
|
||||||
disable_put_regulator(dev->platform_data);
|
|
||||||
|
|
||||||
for (i = 0; i < omap->nports; i++) {
|
for (i = 0; i < omap->nports; i++) {
|
||||||
if (omap->phy[i])
|
if (omap->phy[i])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user