summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-05-27 22:19:28 -0700
committerGary King <gking@nvidia.com>2010-05-27 22:23:28 -0700
commit3f6dfe9482e8db753934927d69f647c2032c7fc6 (patch)
tree9a350eb4dcc808d02d818480bda18446ab3d2f13
parent4180d7ad0253f460e061bab968022c504868173b (diff)
usb: fsl_udc_core: fix tegra regulator support
the driver should get the vbus_regulator using its platform device, not an arbitrary platform device provided via platform data; now that tegra regulators are registered semi-correctly, this hack is not needed Change-Id: I93e2455b7897402767d9e798cb88bc5d48b81250
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c18
-rw-r--r--include/linux/fsl_devices.h1
2 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 2e238f8e166d..1dc651b01ed1 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2545,9 +2545,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
int ret = -ENODEV;
unsigned int i;
u32 dccparams;
-#if defined(CONFIG_ARCH_TEGRA)
- struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
-#endif
if (strcmp(pdev->name, driver_name)) {
VDBG("Wrong device");
@@ -2692,16 +2689,13 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
#else
udc_controller->transceiver = NULL;
#endif
- /* Get the regulator for drawing the vbus current in udc driver */
- if (pdata->regulator_dev) {
- udc_controller->vbus_regulator =
- regulator_get(&pdata->regulator_dev->dev, "vbus_draw");
- if (IS_ERR(udc_controller->vbus_regulator)) {
- dev_err(&pdev->dev, "can't get vbus_draw regulator, err: %ld\n",
- PTR_ERR(udc_controller->vbus_regulator));
- udc_controller->vbus_regulator = NULL;
- }
+ udc_controller->vbus_regulator = regulator_get(&pdev->dev, "vbus_draw");
+ if (IS_ERR(udc_controller->vbus_regulator)) {
+ dev_err(&pdev->dev, "vbus_draw regulator error %ld; charging "
+ "disabled\n", PTR_ERR(udc_controller->vbus_regulator));
+ udc_controller->vbus_regulator = NULL;
}
+
/* Power down the phy if cable is not connected */
if (!(fsl_readl(&usb_sys_regs->vbus_wakeup) & USB_SYS_VBUS_STATUS))
platform_udc_clk_suspend();
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 6f445f389fb3..43fc95d822d5 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -63,7 +63,6 @@ struct fsl_usb2_platform_data {
enum fsl_usb2_operating_modes operating_mode;
enum fsl_usb2_phy_modes phy_mode;
unsigned int port_enables;
- struct platform_device *regulator_dev;
};
/* Flags in fsl_usb2_mph_platform_data */