aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/w1/fsl-imx-owire.txt19
-rw-r--r--drivers/w1/masters/mxc_w1.c9
2 files changed, 27 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt b/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt
new file mode 100644
index 000000000000..ecf42c07684d
--- /dev/null
+++ b/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt
@@ -0,0 +1,19 @@
1* Freescale i.MX One wire bus master controller
2
3Required properties:
4- compatible : should be "fsl,imx21-owire"
5- reg : Address and length of the register set for the device
6
7Optional properties:
8- clocks : phandle of clock that supplies the module (required if platform
9 clock bindings use device tree)
10
11Example:
12
13- From imx53.dtsi:
14owire: owire@63fa4000 {
15 compatible = "fsl,imx53-owire", "fsl,imx21-owire";
16 reg = <0x63fa4000 0x4000>;
17 clocks = <&clks 159>;
18 status = "disabled";
19};
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c
index 708a25fc9961..949e56669548 100644
--- a/drivers/w1/masters/mxc_w1.c
+++ b/drivers/w1/masters/mxc_w1.c
@@ -186,9 +186,16 @@ static int mxc_w1_remove(struct platform_device *pdev)
186 return 0; 186 return 0;
187} 187}
188 188
189static struct of_device_id mxc_w1_dt_ids[] = {
190 { .compatible = "fsl,imx21-owire" },
191 { /* sentinel */ }
192};
193MODULE_DEVICE_TABLE(of, mxc_w1_dt_ids);
194
189static struct platform_driver mxc_w1_driver = { 195static struct platform_driver mxc_w1_driver = {
190 .driver = { 196 .driver = {
191 .name = "mxc_w1", 197 .name = "mxc_w1",
198 .of_match_table = mxc_w1_dt_ids,
192 }, 199 },
193 .probe = mxc_w1_probe, 200 .probe = mxc_w1_probe,
194 .remove = mxc_w1_remove, 201 .remove = mxc_w1_remove,