Thread (35 messages) 35 messages, 4 authors, 2012-07-10

[PATCH v1 09/11] drivers: usb: musb: Add device tree support for omap musb glue

From: Gupta, Ajay Kumar <hidden>
Date: 2012-07-10 07:15:49
Also in: linux-devicetree, linux-omap, lkml

Hi,
 Documentation/devicetree/bindings/usb/omap-usb.txt |   34
++++++++++++-
 drivers/usb/musb/omap2430.c                        |   52
++++++++++++++++++++
[...]
+		of_property_read_u32(np, "mode", (u32 *)&pdata->mode);
+		of_property_read_u32(np, "interface_type",
+						(u32 *)&data->interface_type);
+		of_property_read_u32(np, "num_eps", (u32 *)&config-
quoted
num_eps);
+		of_property_read_u32(np, "ram_bits", (u32 *)&config-
quoted
ram_bits);
+		of_property_read_u32(np, "mode", (u32 *)&pdata->mode);
'mode' has already been read so this should be dropped.

Ajay
quoted hunk ↗ jump to hunk
+		of_property_read_u32(np, "power", (u32 *)&pdata->power);
+		config->multipoint = of_property_read_bool(np,
"multipoint");
+
+		pdata->board_data	= data;
+		pdata->config		= config;
+	}
+
 	pdata->platform_ops		= &omap2430_ops;

 	platform_set_drvdata(pdev, glue);
@@ -597,12 +638,23 @@ static struct dev_pm_ops omap2430_pm_ops = {
 #define DEV_PM_OPS	NULL
 #endif

+#ifdef CONFIG_OF
+static const struct of_device_id omap2430_id_table[] = {
+	{ .compatible = "ti,musb-omap2430" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, omap2430_id_table);
+#else
+#define omap2430_id_table NULL
+#endif
+
 static struct platform_driver omap2430_driver = {
 	.probe		= omap2430_probe,
 	.remove		= __devexit_p(omap2430_remove),
 	.driver		= {
 		.name	= "musb-omap2430",
 		.pm	= DEV_PM_OPS,
+		.of_match_table = omap2430_id_table,
 	},
 };

--
1.7.5.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help