Commit f5a427ee authored by Shawn Guo's avatar Shawn Guo Committed by Wim Van Sebroeck

watchdog: imx2_wdt: add device tree probe support

Adds device tree probe support for imx2_wdt driver.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 9487a9cc
* Freescale i.MX Watchdog Timer (WDT) Controller
Required properties:
- compatible : Should be "fsl,<soc>-wdt"
- reg : Should contain WDT registers location and length
- interrupts : Should contain WDT interrupt
Examples:
wdt@73f98000 {
compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
reg = <0x73f98000 0x4000>;
interrupts = <58>;
};
...@@ -329,12 +329,18 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) ...@@ -329,12 +329,18 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
} }
} }
static const struct of_device_id imx2_wdt_dt_ids[] = {
{ .compatible = "fsl,imx21-wdt", },
{ /* sentinel */ }
};
static struct platform_driver imx2_wdt_driver = { static struct platform_driver imx2_wdt_driver = {
.remove = __exit_p(imx2_wdt_remove), .remove = __exit_p(imx2_wdt_remove),
.shutdown = imx2_wdt_shutdown, .shutdown = imx2_wdt_shutdown,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = imx2_wdt_dt_ids,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment