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

watchdog: imx2_wdt: add device tree probe support

Adds device tree probe support for imx2_wdt driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Shawn Guo and committed by
Wim Van Sebroeck
f5a427ee 9487a9cc

+20
+14
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
··· 1 + * Freescale i.MX Watchdog Timer (WDT) Controller 2 + 3 + Required properties: 4 + - compatible : Should be "fsl,<soc>-wdt" 5 + - reg : Should contain WDT registers location and length 6 + - interrupts : Should contain WDT interrupt 7 + 8 + Examples: 9 + 10 + wdt@73f98000 { 11 + compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; 12 + reg = <0x73f98000 0x4000>; 13 + interrupts = <58>; 14 + };
+6
drivers/watchdog/imx2_wdt.c
··· 329 329 } 330 330 } 331 331 332 + static const struct of_device_id imx2_wdt_dt_ids[] = { 333 + { .compatible = "fsl,imx21-wdt", }, 334 + { /* sentinel */ } 335 + }; 336 + 332 337 static struct platform_driver imx2_wdt_driver = { 333 338 .remove = __exit_p(imx2_wdt_remove), 334 339 .shutdown = imx2_wdt_shutdown, 335 340 .driver = { 336 341 .name = DRIVER_NAME, 337 342 .owner = THIS_MODULE, 343 + .of_match_table = imx2_wdt_dt_ids, 338 344 }, 339 345 }; 340 346