Skip to contentSkip to conversation

w1: omap-hdq: support device probing with device-tree.

PATCH In review NeilBrown 3 participants 3 messages Nov 7, 2014 – Nov 10, 2014

Subsystems (2)
lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 w1: omap-hdq: support device probing with device-tree.

This driver has no 'compatible' string and so is not found when using device-tree.

Add one with value to match

		hdqw1w: 1w@480b2000 {

device in omap3.dtsi.

Documentation/devicetree/bindings/w1/omap-hdq.txt new file +17 -0
new file mode 100644
index 000000000000..fef794741bd1
@@ -0,0 +1,17 @@
+* OMAP HDQ One wire bus master controller
+
+Required properties:
+- compatible : should be "ti,omap3-1w"
+- reg : Address and length of the register set for the device
+- interrupts : interrupt line.
+- ti,hwmods : "hdq1w"
+
+Example:
+
+- From omap3.dtsi
+  hdqw1w: 1w@480b2000 {
+	compatible = "ti,omap3-1w";
+	reg = <0x480b2000 0x1000>;
+	interrupts = <58>;
+	ti,hwmods = "hdq1w";
+  };
drivers/w1/masters/omap_hdq.c +7 -0
index 9900e8ec7393..03321d6a2684 100644
@@ -72,11 +72,18 @@ struct hdq_data {
 static int omap_hdq_probe(struct platform_device *pdev);
 static int omap_hdq_remove(struct platform_device *pdev);
 
+static struct of_device_id omap_hdq_dt_ids[] = {
+	{ .compatible = "ti,omap3-1w" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, omap_hdq_dt_ids);
+
 static struct platform_driver omap_hdq_driver = {
 	.probe =	omap_hdq_probe,
 	.remove =	omap_hdq_remove,
 	.driver =	{
 		.name =	"omap_hdq",
+		.of_match_table = omap_hdq_dt_ids,
 	},
 };
 
#1 lore raw

Hi

08.11.2014, 02:30, "NeilBrown" <[email protected]>:

Quoted 8 lines

This driver has no 'compatible' string and so is not found when using device-tree.

Add one with value to match
                hdqw1w: 1w@480b2000 {
device in omap3.dtsi.

Looks good to me

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 6 lines · Евгений Поляков

Hi

08.11.2014, 02:30, "NeilBrown" <[email protected]>:

Quoted 3 lines

This driver has no 'compatible' string and so is not found when using device-tree.

Quoted 8 lines
Quoted 5 lines

Add one with value to match
                hdqw1w: 1w@480b2000 {
device in omap3.dtsi.

Looks good to me

Applying into omap-for-v3.19/drivers branch thanks.

Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html