aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci13xxx_imx.c
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2013-03-30 12:54:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-30 08:13:58 -0700
commita068533079a0a1be53c78c89e65adfbd3c687591 (patch)
treebe75fdae9ac283f5cf3f5ab7310ba0298578b3e5 /drivers/usb/chipidea/ci13xxx_imx.c
parentf0c910b63cc273c239964776fae1aaa58ed4ad2b (diff)
downloadlinux-a068533079a0a1be53c78c89e65adfbd3c687591.tar.gz
usb: chipidea: usbmisc: add post handling and errata fix for mx25
This adds a post handling routine which is called after ci13xxx_add_device was called. The first user is the mx25, which has to disable the external-vbus-divider after the udc has started. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> [Alex: also fixed a signed one-bit bitfield a whitespace error and yet another set of line-too-long and void pointer casting errors] Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/ci13xxx_imx.c')
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 8c291220be7f..8faec9dbbb84 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.c
+++ b/drivers/usb/chipidea/ci13xxx_imx.c
@@ -79,6 +79,9 @@ int usbmisc_get_init_data(struct device *dev, struct usbmisc_usb_device *usbdev)
if (of_find_property(np, "disable-over-current", NULL))
usbdev->disable_oc = 1;
+ if (of_find_property(np, "external-vbus-divider", NULL))
+ usbdev->evdo = 1;
+
return 0;
}
EXPORT_SYMBOL_GPL(usbmisc_get_init_data);
@@ -202,6 +205,15 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
goto err;
}
+ if (usbmisc_ops && usbmisc_ops->post) {
+ ret = usbmisc_ops->post(&pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "usbmisc post failed, ret=%d\n", ret);
+ goto put_np;
+ }
+ }
+
data->ci_pdev = plat_ci;
platform_set_drvdata(pdev, data);