Commit 25df6397 authored by Sascha Hauer's avatar Sascha Hauer Committed by Felipe Balbi

usb: phy: mxs-phy: register phy with framework

We now have usb_add_phy_dev(), so use it to register with the framework
to be able to find the phy from the USB driver.
Tested-by: default avatarSteffen Trumtrar <s.trumtrar@pengutronix.de>
Reviewed-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent cedf8602
......@@ -127,6 +127,7 @@ static int mxs_phy_probe(struct platform_device *pdev)
void __iomem *base;
struct clk *clk;
struct mxs_phy *mxs_phy;
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
......@@ -166,11 +167,19 @@ static int mxs_phy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, &mxs_phy->phy);
ret = usb_add_phy_dev(&mxs_phy->phy);
if (ret)
return ret;
return 0;
}
static int mxs_phy_remove(struct platform_device *pdev)
{
struct mxs_phy *mxs_phy = platform_get_drvdata(pdev);
usb_remove_phy(&mxs_phy->phy);
platform_set_drvdata(pdev, NULL);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment