All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.linux@gmail.com>
To: wim@iguana.be
Cc: spear-devel@list.st.com, viresh.linux@gmail.com,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Viresh Kumar <viresh.kumar@st.com>
Subject: [PATCH] watchdog: mpcore: Add DT bindings for ARM mpcore watchdog
Date: Fri, 20 Apr 2012 20:12:32 +0530	[thread overview]
Message-ID: <18a4584c24041ceb8a1972dd5ee70cf7c59fed21.1334932839.git.viresh.kumar@st.com> (raw)

This patch adds Device tree bindings for ARM Mpcore watchdog. It also updates
documentation for bindings.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 .../bindings/watchdog/arm-mpcore-wdt.txt           |   19 +++++++++++++++++++
 drivers/watchdog/mpcore_wdt.c                      |   10 ++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt

diff --git a/Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt b/Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt
new file mode 100644
index 0000000..27a71aa
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt
@@ -0,0 +1,19 @@
+* ARM MPCORE WATCHDOG
+
+Required properties:
+- compatible : "arm,mpcore-wdt"
+- reg : Address range of the wdt registers
+
+Optional Properties:
+- interrupt-parent: Should be the phandle for the interrupt controller
+  that services interrupts for this device
+- interrupt: Should contain the wdt interrupt number
+
+Example:
+
+	wdt@ec800620 {
+		compatible = "arm,mpcore-wdt";
+		reg = <0xec800620 0x1000>;
+		interrupt-parent = <&gic>;
+		interrupts = <1 14 0x301>;
+	};
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 7c00455..f82625f 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -27,6 +27,7 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/reboot.h>
@@ -402,6 +403,14 @@ static SIMPLE_DEV_PM_OPS(mpcore_wdt_dev_pm_ops, mpcore_wdt_suspend,
 /* work with hotplug and coldplug */
 MODULE_ALIAS("platform:mpcore_wdt");
 
+#ifdef CONFIG_OF
+static const struct of_device_id mpcore_wdt_id_table[] = {
+	{ .compatible = "arm,mpcore-wdt" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, mpcore_wdt_id_table);
+#endif
+
 static struct platform_driver mpcore_wdt_driver = {
 	.probe		= mpcore_wdt_probe,
 	.remove		= __devexit_p(mpcore_wdt_remove),
@@ -410,6 +419,7 @@ static struct platform_driver mpcore_wdt_driver = {
 		.owner	= THIS_MODULE,
 		.name	= "mpcore_wdt",
 		.pm	= &mpcore_wdt_dev_pm_ops,
+		.of_match_table = of_match_ptr(mpcore_wdt_id_table),
 	},
 };
 
-- 
1.7.9


WARNING: multiple messages have this Message-ID (diff)
From: viresh.linux@gmail.com (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] watchdog: mpcore: Add DT bindings for ARM mpcore watchdog
Date: Fri, 20 Apr 2012 20:12:32 +0530	[thread overview]
Message-ID: <18a4584c24041ceb8a1972dd5ee70cf7c59fed21.1334932839.git.viresh.kumar@st.com> (raw)

This patch adds Device tree bindings for ARM Mpcore watchdog. It also updates
documentation for bindings.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 .../bindings/watchdog/arm-mpcore-wdt.txt           |   19 +++++++++++++++++++
 drivers/watchdog/mpcore_wdt.c                      |   10 ++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt

diff --git a/Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt b/Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt
new file mode 100644
index 0000000..27a71aa
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/arm-mpcore-wdt.txt
@@ -0,0 +1,19 @@
+* ARM MPCORE WATCHDOG
+
+Required properties:
+- compatible : "arm,mpcore-wdt"
+- reg : Address range of the wdt registers
+
+Optional Properties:
+- interrupt-parent: Should be the phandle for the interrupt controller
+  that services interrupts for this device
+- interrupt: Should contain the wdt interrupt number
+
+Example:
+
+	wdt at ec800620 {
+		compatible = "arm,mpcore-wdt";
+		reg = <0xec800620 0x1000>;
+		interrupt-parent = <&gic>;
+		interrupts = <1 14 0x301>;
+	};
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 7c00455..f82625f 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -27,6 +27,7 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/reboot.h>
@@ -402,6 +403,14 @@ static SIMPLE_DEV_PM_OPS(mpcore_wdt_dev_pm_ops, mpcore_wdt_suspend,
 /* work with hotplug and coldplug */
 MODULE_ALIAS("platform:mpcore_wdt");
 
+#ifdef CONFIG_OF
+static const struct of_device_id mpcore_wdt_id_table[] = {
+	{ .compatible = "arm,mpcore-wdt" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, mpcore_wdt_id_table);
+#endif
+
 static struct platform_driver mpcore_wdt_driver = {
 	.probe		= mpcore_wdt_probe,
 	.remove		= __devexit_p(mpcore_wdt_remove),
@@ -410,6 +419,7 @@ static struct platform_driver mpcore_wdt_driver = {
 		.owner	= THIS_MODULE,
 		.name	= "mpcore_wdt",
 		.pm	= &mpcore_wdt_dev_pm_ops,
+		.of_match_table = of_match_ptr(mpcore_wdt_id_table),
 	},
 };
 
-- 
1.7.9

             reply	other threads:[~2012-04-20 14:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 14:42 Viresh Kumar [this message]
2012-04-20 14:42 ` [PATCH] watchdog: mpcore: Add DT bindings for ARM mpcore watchdog Viresh Kumar
2012-04-21  8:32 ` Pawel Moll
2012-04-21  8:32   ` Pawel Moll
2012-04-21 11:41 ` [PATCH V2] watchdog: mpcore: Add DT probing support " Viresh Kumar
2012-04-21 11:41   ` Viresh Kumar
2012-04-23  8:36   ` Marc Zyngier
2012-04-23  8:36     ` Marc Zyngier
2012-04-23 11:35     ` viresh kumar
2012-04-23 11:35       ` viresh kumar
2012-04-23 12:15       ` Marc Zyngier
2012-04-23 12:15         ` Marc Zyngier
2012-04-23 12:21         ` viresh kumar
2012-04-23 12:21           ` viresh kumar
2012-04-23 14:21         ` viresh kumar
2012-04-23 14:21           ` viresh kumar
2012-04-23 15:22           ` Marc Zyngier
2012-04-23 15:22             ` Marc Zyngier
2012-04-23 15:33             ` viresh kumar
2012-04-23 15:33               ` viresh kumar
2012-04-23 15:49               ` Marc Zyngier
2012-04-23 15:49                 ` Marc Zyngier
2012-04-23 16:01                 ` viresh kumar
2012-04-23 16:01                   ` viresh kumar
2012-04-23 16:12                   ` Marc Zyngier
2012-04-23 16:12                     ` Marc Zyngier
2012-04-23 16:16                     ` viresh kumar
2012-04-23 16:16                       ` viresh kumar
2012-04-23 16:26                       ` Marc Zyngier
2012-04-23 16:26                         ` Marc Zyngier
2012-04-24 10:25                         ` Viresh Kumar
2012-04-24 10:25                           ` Viresh Kumar

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=18a4584c24041ceb8a1972dd5ee70cf7c59fed21.1334932839.git.viresh.kumar@st.com \
    --to=viresh.linux@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --cc=viresh.kumar@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.