summaryrefslogtreecommitdiff
path: root/drivers/watchdog/at91rm9200_wdt.c
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2013-02-14 23:02:29 +0100
committerWim Van Sebroeck <wim@iguana.be>2013-03-01 12:55:27 +0100
commita6a1bcd3700a792d89999a7ec89a9303534ccefc (patch)
tree438ef63654764808501bcd3d9c1f709d33ac8a9c /drivers/watchdog/at91rm9200_wdt.c
parentc1fd5f6402050b2463d0610b94f050fedf1b5019 (diff)
watchdog: at91rm9200: add DT support
Add DT support for at91rm9200_wdt. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/at91rm9200_wdt.c')
-rw-r--r--drivers/watchdog/at91rm9200_wdt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index 89831ed24a4f..1c75260b987c 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -24,6 +24,8 @@
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/uaccess.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
#include <mach/at91_st.h>
#define WDT_DEFAULT_TIME 5 /* seconds */
@@ -252,6 +254,12 @@ static int at91wdt_resume(struct platform_device *pdev)
#define at91wdt_resume NULL
#endif
+static const struct of_device_id at91_wdt_dt_ids[] = {
+ { .compatible = "atmel,at91rm9200-wdt" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids);
+
static struct platform_driver at91wdt_driver = {
.probe = at91wdt_probe,
.remove = at91wdt_remove,
@@ -261,6 +269,7 @@ static struct platform_driver at91wdt_driver = {
.driver = {
.name = "at91_wdt",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(at91_wdt_dt_ids),
},
};