Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

W1: Add device tree support to MXC onewire master.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

authored by

Martin Fuzzey and committed by
Shawn Guo
28c55dc1 96574a6d

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