From d373cac58a2361d76c240d033784d7c10e35b1d9 Mon Sep 17 00:00:00 2001 From: Martin Fuzzey Date: Tue, 29 Jan 2013 16:46:10 +0100 Subject: [PATCH] --- yaml --- r: 359806 b: refs/heads/master c: 28c55dc1acc863cb29832b5be2464ebcdafdc3d5 h: refs/heads/master v: v3 --- [refs] | 2 +- .../devicetree/bindings/w1/fsl-imx-owire.txt | 19 +++++++++++++++++++ trunk/drivers/w1/masters/mxc_w1.c | 9 ++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 trunk/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt diff --git a/[refs] b/[refs] index a1e501da38f0..f1ae257d1ce7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 96574a6dc6bee2320276d7468162a72a0e5c3a34 +refs/heads/master: 28c55dc1acc863cb29832b5be2464ebcdafdc3d5 diff --git a/trunk/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt b/trunk/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt new file mode 100644 index 000000000000..ecf42c07684d --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt @@ -0,0 +1,19 @@ +* Freescale i.MX One wire bus master controller + +Required properties: +- compatible : should be "fsl,imx21-owire" +- reg : Address and length of the register set for the device + +Optional properties: +- clocks : phandle of clock that supplies the module (required if platform + clock bindings use device tree) + +Example: + +- From imx53.dtsi: +owire: owire@63fa4000 { + compatible = "fsl,imx53-owire", "fsl,imx21-owire"; + reg = <0x63fa4000 0x4000>; + clocks = <&clks 159>; + status = "disabled"; +}; diff --git a/trunk/drivers/w1/masters/mxc_w1.c b/trunk/drivers/w1/masters/mxc_w1.c index 708a25fc9961..949e56669548 100644 --- a/trunk/drivers/w1/masters/mxc_w1.c +++ b/trunk/drivers/w1/masters/mxc_w1.c @@ -186,9 +186,16 @@ static int mxc_w1_remove(struct platform_device *pdev) return 0; } +static struct of_device_id mxc_w1_dt_ids[] = { + { .compatible = "fsl,imx21-owire" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, mxc_w1_dt_ids); + static struct platform_driver mxc_w1_driver = { .driver = { - .name = "mxc_w1", + .name = "mxc_w1", + .of_match_table = mxc_w1_dt_ids, }, .probe = mxc_w1_probe, .remove = mxc_w1_remove,