[PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch registers the msx-phy as an USB_PHY_TYPE_USB2. This is needed to get
reference to the phy with devm_usb_get_phy_by_phandle(), which will be added in
a later patch.

Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
---
 drivers/usb/otg/mxs-phy.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c
index c1a67cb..240b945 100644
--- a/drivers/usb/otg/mxs-phy.c
+++ b/drivers/usb/otg/mxs-phy.c
@@ -141,11 +141,14 @@ static int mxs_phy_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, &mxs_phy->phy);
 
-	return 0;
+	return usb_add_phy(&mxs_phy->phy, USB_PHY_TYPE_USB2);
 }
 
 static int __devexit 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;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux