diff options
author | NeilBrown <neilb@suse.de> | 2014-11-07 18:30:32 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-11-10 18:58:47 -0500 |
commit | 126e31faa12c0d40c3b603adb9ac6d72dd424860 (patch) | |
tree | 71e335bd684c2aab62824dd34194ef8ee644faa1 | |
parent | cac7f2429872d3733dc3f9915857b1691da2eb2f (diff) |
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.
Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | Documentation/devicetree/bindings/w1/omap-hdq.txt | 17 | ||||
-rw-r--r-- | drivers/w1/masters/omap_hdq.c | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/w1/omap-hdq.txt b/Documentation/devicetree/bindings/w1/omap-hdq.txt new file mode 100644 index 000000000000..fef794741bd1 --- /dev/null +++ b/Documentation/devicetree/bindings/w1/omap-hdq.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * OMAP HDQ One wire bus master controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "ti,omap3-1w" | ||
5 | - reg : Address and length of the register set for the device | ||
6 | - interrupts : interrupt line. | ||
7 | - ti,hwmods : "hdq1w" | ||
8 | |||
9 | Example: | ||
10 | |||
11 | - From omap3.dtsi | ||
12 | hdqw1w: 1w@480b2000 { | ||
13 | compatible = "ti,omap3-1w"; | ||
14 | reg = <0x480b2000 0x1000>; | ||
15 | interrupts = <58>; | ||
16 | ti,hwmods = "hdq1w"; | ||
17 | }; | ||
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 9900e8ec7393..03321d6a2684 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c | |||
@@ -72,11 +72,18 @@ struct hdq_data { | |||
72 | static int omap_hdq_probe(struct platform_device *pdev); | 72 | static int omap_hdq_probe(struct platform_device *pdev); |
73 | static int omap_hdq_remove(struct platform_device *pdev); | 73 | static int omap_hdq_remove(struct platform_device *pdev); |
74 | 74 | ||
75 | static struct of_device_id omap_hdq_dt_ids[] = { | ||
76 | { .compatible = "ti,omap3-1w" }, | ||
77 | {} | ||
78 | }; | ||
79 | MODULE_DEVICE_TABLE(of, omap_hdq_dt_ids); | ||
80 | |||
75 | static struct platform_driver omap_hdq_driver = { | 81 | static struct platform_driver omap_hdq_driver = { |
76 | .probe = omap_hdq_probe, | 82 | .probe = omap_hdq_probe, |
77 | .remove = omap_hdq_remove, | 83 | .remove = omap_hdq_remove, |
78 | .driver = { | 84 | .driver = { |
79 | .name = "omap_hdq", | 85 | .name = "omap_hdq", |
86 | .of_match_table = omap_hdq_dt_ids, | ||
80 | }, | 87 | }, |
81 | }; | 88 | }; |
82 | 89 | ||