From: "Heiko Stübner" <heiko@sntech.de>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: Jamie Iles <jamie@jamieiles.com>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: [PATCH 3/3] watchdog: dw_wdt: add a devicetree binding
Date: Wed, 26 Jun 2013 20:05:05 +0200 [thread overview]
Message-ID: <201306262005.05765.heiko@sntech.de> (raw)
In-Reply-To: <201306262003.13256.heiko@sntech.de>
The dw_wdt does not use any platform-specific data, so no new properties
need to be introduced. The dw-apb-wdt naming follows other designware
components in the kernel and is also written like this in documentation
describing the component.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../devicetree/bindings/watchdog/snps-dw-apb-wdt.txt | 18 ++++++++++++++++++
drivers/watchdog/dw_wdt.c | 10 ++++++++++
2 files changed, 28 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/snps-dw-apb-wdt.txt
diff --git a/Documentation/devicetree/bindings/watchdog/snps-dw-apb-wdt.txt b/Documentation/devicetree/bindings/watchdog/snps-dw-apb-wdt.txt
new file mode 100644
index 0000000..c20cdd1
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/snps-dw-apb-wdt.txt
@@ -0,0 +1,18 @@
+* Synosis DesignWare APB Watchdog
+
+The Watchdog controller is used for resuming system operation
+after a preset amount of time during which the WDT reset event has not
+occurred.
+
+Required properties:
+- compatible : "snps,dw-apb-wdt"
+- reg : offset and length of the register set for the device.
+- clocks : the periphal clock of the controller.
+
+Example:
+
+ watchdog@2004c000 {
+ compatible = "snps,dw-apb-wdt";
+ reg = <0x2004c000 0x100>;
+ clocks = <&wdt_clock>;
+ };
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index b922bec..829e148 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -35,6 +35,7 @@
#include <linux/timer.h>
#include <linux/uaccess.h>
#include <linux/watchdog.h>
+#include <linux/of.h>
#define WDOG_CONTROL_REG_OFFSET 0x00
#define WDOG_CONTROL_REG_WDT_EN_MASK 0x01
@@ -337,12 +338,21 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id dw_wdt_of_match[] = {
+ { .compatible = "snps,dw-apb-wdt", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
+#endif
+
static struct platform_driver dw_wdt_driver = {
.probe = dw_wdt_drv_probe,
.remove = dw_wdt_drv_remove,
.driver = {
.name = "dw_wdt",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(dw_wdt_of_match),
.pm = &dw_wdt_pm_ops,
},
};
--
1.7.10.4
next prev parent reply other threads:[~2013-06-26 18:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 18:03 [PATCH 0/3] watchdog: dw_wdt: common clock framework and devicetree support Heiko Stübner
2013-06-26 18:03 ` [PATCH 1/3] watchdog: dw_wdt: convert to SIMPLE_DEV_PM_OPS Heiko Stübner
2013-06-26 18:04 ` [PATCH 2/3] watchdog: dw_wdt: use clk_prepare_enable and clk_disable_unprepare Heiko Stübner
2013-06-26 18:05 ` Heiko Stübner [this message]
2013-06-27 6:31 ` [PATCH 3/3] watchdog: dw_wdt: add a devicetree binding Sachin Kamat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201306262005.05765.heiko@sntech.de \
--to=heiko@sntech.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=jamie@jamieiles.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).