LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH_V2 0/2] watchdog: jz4740: Add DT support
@ 2015-01-29 10:48 Zubair Lutfullah Kakakhel
  2015-01-29 10:48 ` [PATCH_V2 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer Zubair Lutfullah Kakakhel
  2015-01-29 10:48 ` [PATCH_V2 2/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
  0 siblings, 2 replies; 5+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-01-29 10:48 UTC (permalink / raw)
  To: wim; +Cc: devicetree, linux-kernel, linux-watchdog, Zubair.Kakakhel, paul

Hi,

Here are two simple patches that add DT support to the jz4740 watchdog driver.

Patches are based on 3.19-rc6. Quite disjoint and stay within jz4740
so should apply easily on other trees.

If you would like to have them rebased to a different tree, please tell.

V2 Changes
Renamed binding to jz4740 instead of jz47xx
Removed clk bindings. They can be added later when the clock tree is fixed.
Rather than add bindings now and change later.

Added MODULE_DEVICE_TABLE()

Thank-you

ZubairLK

Zubair Lutfullah Kakakhel (2):
  dt: watchdog: Add DT binding documentation for jz4740 watchdog timer
  watchdog: jz4740: Add DT support

 .../devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt      | 12 ++++++++++++
 drivers/watchdog/jz4740_wdt.c                                | 10 ++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt

-- 
1.9.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH_V2 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer
  2015-01-29 10:48 [PATCH_V2 0/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
@ 2015-01-29 10:48 ` Zubair Lutfullah Kakakhel
  2015-02-03  1:57   ` Guenter Roeck
  2015-01-29 10:48 ` [PATCH_V2 2/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
  1 sibling, 1 reply; 5+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-01-29 10:48 UTC (permalink / raw)
  To: wim; +Cc: devicetree, linux-kernel, linux-watchdog, Zubair.Kakakhel, paul

Add binding for jz4740 watchdog timer. It is a simple watchdog timer.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>

---
The jz4740 is platform only at the moment.

But DT support is being added

See http://patchwork.linux-mips.org/bundle/paulburton/ci20-v3.20/

V2 Changes

Removed clock binding because of pending work in clock tree. Will add
binding later. Rather than introduce a bad binding now and change later.

Renamed to jz4740 instead of jz47xx.
---
 .../devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt      | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt

diff --git a/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt b/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
new file mode 100644
index 0000000..e27763e
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
@@ -0,0 +1,12 @@
+Ingenic Watchdog Timer (WDT) Controller for JZ4740
+
+Required properties:
+compatible: "ingenic,jz4740-watchdog"
+reg: Register address and length for watchdog registers
+
+Example:
+
+watchdog: jz4740-watchdog@0x10002000 {
+	compatible = "ingenic,jz4740-watchdog";
+	reg = <0x10002000 0x100>;
+};
-- 
1.9.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH_V2 2/2] watchdog: jz4740: Add DT support
  2015-01-29 10:48 [PATCH_V2 0/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
  2015-01-29 10:48 ` [PATCH_V2 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer Zubair Lutfullah Kakakhel
@ 2015-01-29 10:48 ` Zubair Lutfullah Kakakhel
  2015-02-03  1:58   ` Guenter Roeck
  1 sibling, 1 reply; 5+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-01-29 10:48 UTC (permalink / raw)
  To: wim; +Cc: devicetree, linux-kernel, linux-watchdog, Zubair.Kakakhel, paul

Add DT support to the jz4740 driver. Simple of_match_ptr. No other
modification for probe needed

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Reviewed-by: Guenetr Roeck <linux@roeck-us.net>

---
V2 changes
Add module device table. Even though we are moving to non-dt for jz4740.
Lets try and not break things while at it.

Renamed jz4740_of_match to jz4740_wdt_of_match
---
 drivers/watchdog/jz4740_wdt.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
index 18e41af..4c2cc09 100644
--- a/drivers/watchdog/jz4740_wdt.c
+++ b/drivers/watchdog/jz4740_wdt.c
@@ -24,6 +24,7 @@
 #include <linux/clk.h>
 #include <linux/slab.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 #include <asm/mach-jz4740/timer.h>
 
@@ -142,6 +143,14 @@ static const struct watchdog_ops jz4740_wdt_ops = {
 	.set_timeout = jz4740_wdt_set_timeout,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id jz4740_wdt_of_matches[] = {
+	{ .compatible = "ingenic,jz4740-watchdog", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, jz4740_wdt_of_matches)
+#endif
+
 static int jz4740_wdt_probe(struct platform_device *pdev)
 {
 	struct jz4740_wdt_drvdata *drvdata;
@@ -211,6 +220,7 @@ static struct platform_driver jz4740_wdt_driver = {
 	.remove = jz4740_wdt_remove,
 	.driver = {
 		.name = "jz4740-wdt",
+		.of_match_table = of_match_ptr(jz4740_wdt_of_matches),
 	},
 };
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH_V2 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer
  2015-01-29 10:48 ` [PATCH_V2 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer Zubair Lutfullah Kakakhel
@ 2015-02-03  1:57   ` Guenter Roeck
  0 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2015-02-03  1:57 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, wim
  Cc: devicetree, linux-kernel, linux-watchdog, paul

On 01/29/2015 02:48 AM, Zubair Lutfullah Kakakhel wrote:
> Add binding for jz4740 watchdog timer. It is a simple watchdog timer.
>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH_V2 2/2] watchdog: jz4740: Add DT support
  2015-01-29 10:48 ` [PATCH_V2 2/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
@ 2015-02-03  1:58   ` Guenter Roeck
  0 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2015-02-03  1:58 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, wim
  Cc: devicetree, linux-kernel, linux-watchdog, paul

On 01/29/2015 02:48 AM, Zubair Lutfullah Kakakhel wrote:
> Add DT support to the jz4740 driver. Simple of_match_ptr. No other
> modification for probe needed
>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
>
s/Guenetr/Guenter/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-03  1:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 10:48 [PATCH_V2 0/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
2015-01-29 10:48 ` [PATCH_V2 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer Zubair Lutfullah Kakakhel
2015-02-03  1:57   ` Guenter Roeck
2015-01-29 10:48 ` [PATCH_V2 2/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel
2015-02-03  1:58   ` Guenter Roeck

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).