Skip to content

Commit

Permalink
w1: omap-hdq: support device probing with device-tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown authored and Tony Lindgren committed Nov 10, 2014
1 parent cac7f24 commit 126e31f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/w1/omap-hdq.txt
Original file line number Diff line number Diff line change
@@ -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";
};
7 changes: 7 additions & 0 deletions drivers/w1/masters/omap_hdq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};

Expand Down

0 comments on commit 126e31f

Please sign in to comment.