Commit f5a427eedeead2be82561497a12788bd1f0c07d3

Authored by Shawn Guo
Committed by Wim Van Sebroeck
1 parent 9487a9cc71

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>

Showing 2 changed files with 20 additions and 0 deletions Side-by-side Diff

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 +};
drivers/watchdog/imx2_wdt.c
... ... @@ -329,12 +329,18 @@
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