[PATCH 3/3] USB: imx-usb-phy: add device tree support

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

 



Signed-off-by: Philipp Zabel <philipp.zabel@xxxxxxxxx>
---
 drivers/usb/imx/imx-usb-phy.c |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/imx/imx-usb-phy.c b/drivers/usb/imx/imx-usb-phy.c
index ce9c93f..8eb832e 100644
--- a/drivers/usb/imx/imx-usb-phy.c
+++ b/drivers/usb/imx/imx-usb-phy.c
@@ -93,13 +93,26 @@ err_free:
 	return ret;
 };
 
+static __maybe_unused struct of_device_id imx_usbphy_dt_ids[] = {
+	{
+		.compatible = "fsl,imx23-usbphy",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct driver_d imx_usbphy_driver = {
 	.name   = "imx-usb-phy",
 	.probe  = imx_usbphy_probe,
+	.of_compatible = DRV_OF_COMPAT(imx_usbphy_dt_ids),
 };
 
 static int imx_usbphy_init(void)
 {
 	return platform_driver_register(&imx_usbphy_driver);
 }
-coredevice_initcall(imx_usbphy_init);
+/*
+ * Make sure this is initialized after gpt, since we
+ * need timers for the udelay in imx_usbphy_enable.
+ */
+fs_initcall(imx_usbphy_init);
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux