aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-02 04:34:54 -0500
committerWim Van Sebroeck <wim@iguana.be>2013-03-01 06:22:43 -0500
commit15920d12998a408efe4b1b25a28c21dfc48f6e69 (patch)
treea1701c193f643fb77d9eb3a899eb8e0c005840a5 /drivers/watchdog
parent09f5100a592d11dad06b218f41d560ff1f87f666 (diff)
watchdog: ath79_wdt: add device tree matching
Cc: Grant Likely <grant.likely@secretlab.ca> Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/ath79_wdt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c
index e786f644e14b..898799074a13 100644
--- a/drivers/watchdog/ath79_wdt.c
+++ b/drivers/watchdog/ath79_wdt.c
@@ -33,6 +33,8 @@
33#include <linux/watchdog.h> 33#include <linux/watchdog.h>
34#include <linux/clk.h> 34#include <linux/clk.h>
35#include <linux/err.h> 35#include <linux/err.h>
36#include <linux/of.h>
37#include <linux/of_platform.h>
36 38
37#define DRIVER_NAME "ath79-wdt" 39#define DRIVER_NAME "ath79-wdt"
38 40
@@ -308,6 +310,14 @@ static void ath97_wdt_shutdown(struct platform_device *pdev)
308 ath79_wdt_disable(); 310 ath79_wdt_disable();
309} 311}
310 312
313#ifdef CONFIG_OF
314static const struct of_device_id ath79_wdt_match[] = {
315 { .compatible = "qca,ar7130-wdt" },
316 {},
317};
318MODULE_DEVICE_TABLE(of, ath79_wdt_match);
319#endif
320
311static struct platform_driver ath79_wdt_driver = { 321static struct platform_driver ath79_wdt_driver = {
312 .probe = ath79_wdt_probe, 322 .probe = ath79_wdt_probe,
313 .remove = ath79_wdt_remove, 323 .remove = ath79_wdt_remove,
@@ -315,6 +325,7 @@ static struct platform_driver ath79_wdt_driver = {
315 .driver = { 325 .driver = {
316 .name = DRIVER_NAME, 326 .name = DRIVER_NAME,
317 .owner = THIS_MODULE, 327 .owner = THIS_MODULE,
328 .of_match_table = of_match_ptr(ath79_wdt_match),
318 }, 329 },
319}; 330};
320 331