devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
@ 2013-10-02 18:44 dinguyen-EIB2kfCEclfQT0dZR+AlfA
       [not found] ` <1380739472-26172-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: dinguyen-EIB2kfCEclfQT0dZR+AlfA @ 2013-10-02 18:44 UTC (permalink / raw)
  To: dinh.linux-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Dinh Nguyen, Guenter Roeck, Jamie Iles, Viresh Kumar,
	Wim Van Sebroeck, Pavel Machek, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA

From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>

Add device tree support to the DW watchdog timer.

Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
v2:
- Use of_match_ptr() for of_match_table
---
 .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
 drivers/watchdog/dw_wdt.c                          |    8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt

diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
new file mode 100644
index 0000000..29e150b
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
@@ -0,0 +1,16 @@
+Synopsys Designware Watchdog Timer
+
+Required Properties:
+
+- Compatiblity	: "snps,dw-wdt"
+- reg		: Base address of the watchdog timer register.
+
+Example:
+
+	watchdog0: wd@ffd02000 {
+		compatible = "snps,dw-wdt";
+		reg = <0xffd02000 0x1000>;
+		interrupts = <0 171 4>;
+		clocks = <&per_base_clk>;
+		status = "okay";
+	};
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 2037669..a720f9b 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -29,6 +29,7 @@
 #include <linux/miscdevice.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/of.h>
 #include <linux/pm.h>
 #include <linux/platform_device.h>
 #include <linux/spinlock.h>
@@ -343,12 +344,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dw_wdt_of_match[] = {
+	{ .compatible = "snps,dw-wdt", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, dw_wdt_of_match);
+
 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),
 #ifdef CONFIG_PM
 		.pm	= &dw_wdt_pm_ops,
 #endif /* CONFIG_PM */
-- 
1.7.9.5


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
       [not found] ` <1380739472-26172-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
@ 2013-10-02 19:27   ` Guenter Roeck
  2013-10-21 11:05   ` Mark Rutland
  1 sibling, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2013-10-02 19:27 UTC (permalink / raw)
  To: dinguyen-EIB2kfCEclfQT0dZR+AlfA
  Cc: dinh.linux-Re5JQEeQqe8AvxtiuMwx3w, Jamie Iles, Viresh Kumar,
	Wim Van Sebroeck, Pavel Machek, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Sachin Kamat

On Wed, Oct 02, 2013 at 01:44:32PM -0500, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote:
> From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> 
> Add device tree support to the DW watchdog timer.
> 
> Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
> Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
> Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
> v2:
> - Use of_match_ptr() for of_match_table
> ---
>  .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
>  drivers/watchdog/dw_wdt.c                          |    8 ++++++++
>  2 files changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> new file mode 100644
> index 0000000..29e150b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> @@ -0,0 +1,16 @@
> +Synopsys Designware Watchdog Timer
> +
> +Required Properties:
> +
> +- Compatiblity	: "snps,dw-wdt"
> +- reg		: Base address of the watchdog timer register.
> +
> +Example:
> +
> +	watchdog0: wd@ffd02000 {
> +		compatible = "snps,dw-wdt";
> +		reg = <0xffd02000 0x1000>;
> +		interrupts = <0 171 4>;
> +		clocks = <&per_base_clk>;
> +		status = "okay";
> +	};
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index 2037669..a720f9b 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -29,6 +29,7 @@
>  #include <linux/miscdevice.h>
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
> +#include <linux/of.h>
>  #include <linux/pm.h>
>  #include <linux/platform_device.h>
>  #include <linux/spinlock.h>
> @@ -343,12 +344,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id dw_wdt_of_match[] = {
> +	{ .compatible = "snps,dw-wdt", },
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, dw_wdt_of_match);
> +
>  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),

There is a separate set of patches from Sachin, removing unnecessary
uses of of_match_ptr() from various watchdog drivers. Sachin's argument
is that it does not make sense to use of_match_ptr if the function
it points to (dw_wdt_of_match in this case) is always compiled
unconditionally anyway.

Your comments suggest that you actually _added_ of_match_ptr() in v2 of this
patch, even though dw_wdt_of_match always exists and of_match_ptr is thus
technically unnecessary.

Not that I really care one way or another, but can we get an authoritative
answer what subsystem maintainers are supposed to accept ?

Thanks,
Guenter

>  #ifdef CONFIG_PM
>  		.pm	= &dw_wdt_pm_ops,
>  #endif /* CONFIG_PM */
> -- 
> 1.7.9.5
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
       [not found] ` <1380739472-26172-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
  2013-10-02 19:27   ` Guenter Roeck
@ 2013-10-21 11:05   ` Mark Rutland
  2013-10-22  0:41     ` Guenter Roeck
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Rutland @ 2013-10-21 11:05 UTC (permalink / raw)
  To: dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org
  Cc: dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Guenter Roeck,
	Jamie Iles, Viresh Kumar, Wim Van Sebroeck, Pavel Machek,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, Pawel Moll,
	Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Wed, Oct 02, 2013 at 07:44:32PM +0100, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote:
> From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> 
> Add device tree support to the DW watchdog timer.
> 
> Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
> Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
> Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
> v2:
> - Use of_match_ptr() for of_match_table
> ---
>  .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
>  drivers/watchdog/dw_wdt.c                          |    8 ++++++++
>  2 files changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> new file mode 100644
> index 0000000..29e150b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> @@ -0,0 +1,16 @@
> +Synopsys Designware Watchdog Timer
> +
> +Required Properties:
> +
> +- Compatiblity	: "snps,dw-wdt"

This should presumably be:

- compatbile: should contain "snps,dw-wdt"

> +- reg		: Base address of the watchdog timer register.

And the size...

> +
> +Example:
> +
> +	watchdog0: wd@ffd02000 {
> +		compatible = "snps,dw-wdt";
> +		reg = <0xffd02000 0x1000>;
> +		interrupts = <0 171 4>;

This wasn't mentioned.

Is it necessary?

Is it the only interrupt?

> +		clocks = <&per_base_clk>;

Similarly, is this the only clock?

Is it necessary?

> +		status = "okay";

This is unnecessary.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
  2013-10-21 11:05   ` Mark Rutland
@ 2013-10-22  0:41     ` Guenter Roeck
       [not found]       ` <5265C9B0.2060003-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2013-10-22  0:41 UTC (permalink / raw)
  To: Mark Rutland, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org
  Cc: dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Jamie Iles,
	Viresh Kumar, Wim Van Sebroeck, Pavel Machek,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, Pawel Moll,
	Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 10/21/2013 04:05 AM, Mark Rutland wrote:
> On Wed, Oct 02, 2013 at 07:44:32PM +0100, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote:
>> From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
>>
>> Add device tree support to the DW watchdog timer.
>>
>> Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
>> Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
>> Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
>> Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>> Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
>> Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
>> Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
>> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
>> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
>> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
>> Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> ---
>> v2:
>> - Use of_match_ptr() for of_match_table
>> ---
>>   .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
>>   drivers/watchdog/dw_wdt.c                          |    8 ++++++++
>>   2 files changed, 24 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>>
>> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>> new file mode 100644
>> index 0000000..29e150b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>> @@ -0,0 +1,16 @@
>> +Synopsys Designware Watchdog Timer
>> +
>> +Required Properties:
>> +
>> +- Compatiblity	: "snps,dw-wdt"
>
> This should presumably be:
>
> - compatbile: should contain "snps,dw-wdt"
>

Hi Mark,

s/compatbile/compatible/ :-)

"must be" or "should contain" ? I see both in various bindings.
Is there a preference ?

>> +- reg		: Base address of the watchdog timer register.
>
> And the size...
>
>> +
>> +Example:
>> +
>> +	watchdog0: wd@ffd02000 {
>> +		compatible = "snps,dw-wdt";
>> +		reg = <0xffd02000 0x1000>;
>> +		interrupts = <0 171 4>;
>
> This wasn't mentioned.
>
> Is it necessary?
>

 From looking into the code ...

The driver doesn't use interrupts, so I guess the answer is no. Cut-and-paste error, maybe ?

> Is it the only interrupt?
>
>> +		clocks = <&per_base_clk>;
>
> Similarly, is this the only clock?
>
The driver uses one clock, and it is mandatory.

Guenter

> Is it necessary?
>
>> +		status = "okay";
>
> This is unnecessary.
>
> Thanks,
> Mark.
>
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
       [not found]       ` <5265C9B0.2060003-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
@ 2013-10-22 10:39         ` Mark Rutland
  2013-10-22 10:57           ` Dinh Nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Rutland @ 2013-10-22 10:39 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org,
	dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Jamie Iles,
	Viresh Kumar, Wim Van Sebroeck, Pavel Machek,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, Pawel Moll,
	Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Tue, Oct 22, 2013 at 01:41:20AM +0100, Guenter Roeck wrote:
> On 10/21/2013 04:05 AM, Mark Rutland wrote:
> > On Wed, Oct 02, 2013 at 07:44:32PM +0100, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote:
> >> From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> >>
> >> Add device tree support to the DW watchdog timer.
> >>
> >> Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> >> Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> >> Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> >> Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> >> Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> >> Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
> >> Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> >> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> >> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> >> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
> >> Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
> >> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> ---
> >> v2:
> >> - Use of_match_ptr() for of_match_table
> >> ---
> >>   .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
> >>   drivers/watchdog/dw_wdt.c                          |    8 ++++++++
> >>   2 files changed, 24 insertions(+)
> >>   create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >> new file mode 100644
> >> index 0000000..29e150b
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >> @@ -0,0 +1,16 @@
> >> +Synopsys Designware Watchdog Timer
> >> +
> >> +Required Properties:
> >> +
> >> +- Compatiblity	: "snps,dw-wdt"
> >
> > This should presumably be:
> >
> > - compatbile: should contain "snps,dw-wdt"
> >
> 
> Hi Mark,
> 
> s/compatbile/compatible/ :-)

Indeed :)

> 
> "must be" or "should contain" ? I see both in various bindings.
> Is there a preference ?

I would prefer "should contain" -- it doesn't preclude future compatible
variants.

> 
> >> +- reg		: Base address of the watchdog timer register.
> >
> > And the size...
> >
> >> +
> >> +Example:
> >> +
> >> +	watchdog0: wd@ffd02000 {
> >> +		compatible = "snps,dw-wdt";
> >> +		reg = <0xffd02000 0x1000>;
> >> +		interrupts = <0 171 4>;
> >
> > This wasn't mentioned.
> >
> > Is it necessary?
> >
> 
>  From looking into the code ...
> 
> The driver doesn't use interrupts, so I guess the answer is no. Cut-and-paste error, maybe ?

Does the device have any interrupts, even if they're unused?

> 
> > Is it the only interrupt?
> >
> >> +		clocks = <&per_base_clk>;
> >
> > Similarly, is this the only clock?
> >
> The driver uses one clock, and it is mandatory.

Is this the only clock into the unit?

Does it have a name?

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
  2013-10-22 10:39         ` Mark Rutland
@ 2013-10-22 10:57           ` Dinh Nguyen
       [not found]             ` <52665A1E.5020700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Dinh Nguyen @ 2013-10-22 10:57 UTC (permalink / raw)
  To: Mark Rutland, Guenter Roeck
  Cc: dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org, Jamie Iles,
	Viresh Kumar, Wim Van Sebroeck, Pavel Machek,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, Pawel Moll,
	Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Mark,

On 10/22/13 5:39 AM, Mark Rutland wrote:
> On Tue, Oct 22, 2013 at 01:41:20AM +0100, Guenter Roeck wrote:
>> On 10/21/2013 04:05 AM, Mark Rutland wrote:
>>> On Wed, Oct 02, 2013 at 07:44:32PM +0100, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote:
>>>> From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
>>>>
>>>> Add device tree support to the DW watchdog timer.
>>>>
>>>> Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
>>>> Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
>>>> Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
>>>> Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>>>> Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
>>>> Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
>>>> Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
>>>> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>>> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
>>>> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
>>>> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
>>>> Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
>>>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>>> Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>>> ---
>>>> v2:
>>>> - Use of_match_ptr() for of_match_table
>>>> ---
>>>>    .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
>>>>    drivers/watchdog/dw_wdt.c                          |    8 ++++++++
>>>>    2 files changed, 24 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>>>> new file mode 100644
>>>> index 0000000..29e150b
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>>>> @@ -0,0 +1,16 @@
>>>> +Synopsys Designware Watchdog Timer
>>>> +
>>>> +Required Properties:
>>>> +
>>>> +- Compatiblity	: "snps,dw-wdt"
>>> This should presumably be:
>>>
>>> - compatbile: should contain "snps,dw-wdt"
>>>
>> Hi Mark,
>>
>> s/compatbile/compatible/ :-)
> Indeed :)
Changed for v3.
>
>> "must be" or "should contain" ? I see both in various bindings.
>> Is there a preference ?
> I would prefer "should contain" -- it doesn't preclude future compatible
> variants.
Oops..v3 has "should be"...will change to "should contain" in v4.
>
>>>> +- reg		: Base address of the watchdog timer register.
>>> And the size...
>>>
>>>> +
>>>> +Example:
>>>> +
>>>> +	watchdog0: wd@ffd02000 {
>>>> +		compatible = "snps,dw-wdt";
>>>> +		reg = <0xffd02000 0x1000>;
>>>> +		interrupts = <0 171 4>;
>>> This wasn't mentioned.
>>>
>>> Is it necessary?
>>>
>>   From looking into the code ...
>>
>> The driver doesn't use interrupts, so I guess the answer is no. Cut-and-paste error, maybe ?
> Does the device have any interrupts, even if they're unused?
Yes, the device does have an interrupt. Should I add it as an optional 
property?
>
>>> Is it the only interrupt?
>>>
>>>> +		clocks = <&per_base_clk>;
>>> Similarly, is this the only clock?
>>>
>> The driver uses one clock, and it is mandatory.
> Is this the only clock into the unit?
>
> Does it have a name?
Yes, this is is the only clock into the unit. No, it does not have name.

Thanks,
Dinh
>
> Thanks,
> Mark.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
       [not found]             ` <52665A1E.5020700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-10-22 11:02               ` Mark Rutland
  2013-10-22 11:02               ` Jamie Iles
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Rutland @ 2013-10-22 11:02 UTC (permalink / raw)
  To: Dinh Nguyen
  Cc: Guenter Roeck, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org,
	Jamie Iles, Viresh Kumar, Wim Van Sebroeck, Pavel Machek,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, Pawel Moll,
	Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Tue, Oct 22, 2013 at 11:57:34AM +0100, Dinh Nguyen wrote:
> Hi Mark,
> 
> On 10/22/13 5:39 AM, Mark Rutland wrote:
> > On Tue, Oct 22, 2013 at 01:41:20AM +0100, Guenter Roeck wrote:
> >> On 10/21/2013 04:05 AM, Mark Rutland wrote:
> >>> On Wed, Oct 02, 2013 at 07:44:32PM +0100, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote:
> >>>> From: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> >>>>
> >>>> Add device tree support to the DW watchdog timer.
> >>>>
> >>>> Signed-off-by: Dinh Nguyen <dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
> >>>> Acked-by: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> >>>> Reviewed-by: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> >>>> Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> >>>> Cc: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
> >>>> Cc: Viresh Kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>>> Cc: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
> >>>> Cc: Pavel Machek <pavel-ynQEQJNshbs@public.gmane.org>
> >>>> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >>>> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> >>>> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> >>>> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
> >>>> Cc: Ian Campbell <ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
> >>>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >>>> Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >>>> ---
> >>>> v2:
> >>>> - Use of_match_ptr() for of_match_table
> >>>> ---
> >>>>    .../devicetree/bindings/watchdog/dw_wdt.txt        |   16 ++++++++++++++++
> >>>>    drivers/watchdog/dw_wdt.c                          |    8 ++++++++
> >>>>    2 files changed, 24 insertions(+)
> >>>>    create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >>>> new file mode 100644
> >>>> index 0000000..29e150b
> >>>> --- /dev/null
> >>>> +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >>>> @@ -0,0 +1,16 @@
> >>>> +Synopsys Designware Watchdog Timer
> >>>> +
> >>>> +Required Properties:
> >>>> +
> >>>> +- Compatiblity	: "snps,dw-wdt"
> >>> This should presumably be:
> >>>
> >>> - compatbile: should contain "snps,dw-wdt"
> >>>
> >> Hi Mark,
> >>
> >> s/compatbile/compatible/ :-)
> > Indeed :)
> Changed for v3.
> >
> >> "must be" or "should contain" ? I see both in various bindings.
> >> Is there a preference ?
> > I would prefer "should contain" -- it doesn't preclude future compatible
> > variants.
> Oops..v3 has "should be"...will change to "should contain" in v4.

Cheers.

> >
> >>>> +- reg		: Base address of the watchdog timer register.
> >>> And the size...
> >>>
> >>>> +
> >>>> +Example:
> >>>> +
> >>>> +	watchdog0: wd@ffd02000 {
> >>>> +		compatible = "snps,dw-wdt";
> >>>> +		reg = <0xffd02000 0x1000>;
> >>>> +		interrupts = <0 171 4>;
> >>> This wasn't mentioned.
> >>>
> >>> Is it necessary?
> >>>
> >>   From looking into the code ...
> >>
> >> The driver doesn't use interrupts, so I guess the answer is no. Cut-and-paste error, maybe ?
> > Does the device have any interrupts, even if they're unused?
> Yes, the device does have an interrupt. Should I add it as an optional 
> property?

Yes please, given it's easy to add. We might want to use it in future so it
would be nice to have now.

> >
> >>> Is it the only interrupt?
> >>>
> >>>> +		clocks = <&per_base_clk>;
> >>> Similarly, is this the only clock?
> >>>
> >> The driver uses one clock, and it is mandatory.
> > Is this the only clock into the unit?
> >
> > Does it have a name?
> Yes, this is is the only clock into the unit. No, it does not have name.

Ok.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer.
       [not found]             ` <52665A1E.5020700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-10-22 11:02               ` Mark Rutland
@ 2013-10-22 11:02               ` Jamie Iles
  1 sibling, 0 replies; 8+ messages in thread
From: Jamie Iles @ 2013-10-22 11:02 UTC (permalink / raw)
  To: Dinh Nguyen
  Cc: Mark Rutland, Guenter Roeck,
	dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org, Jamie Iles,
	Viresh Kumar, Wim Van Sebroeck, Pavel Machek,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, Pawel Moll,
	Stephen Warren, Ian Campbell,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Tue, Oct 22, 2013 at 05:57:34AM -0500, Dinh Nguyen wrote:
> On 10/22/13 5:39 AM, Mark Rutland wrote:
> >Does the device have any interrupts, even if they're unused?
> Yes, the device does have an interrupt. Should I add it as an
> optional property?

iirc the interrupt feature is part of the IP configuration so not all 
instantiations will have the interrupt, so this should be an optional 
property.

Jamie
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-10-22 11:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 18:44 [RESEND PATCHv2] watchdog: dw: Enable OF support for DW watchdog timer dinguyen-EIB2kfCEclfQT0dZR+AlfA
     [not found] ` <1380739472-26172-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
2013-10-02 19:27   ` Guenter Roeck
2013-10-21 11:05   ` Mark Rutland
2013-10-22  0:41     ` Guenter Roeck
     [not found]       ` <5265C9B0.2060003-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-10-22 10:39         ` Mark Rutland
2013-10-22 10:57           ` Dinh Nguyen
     [not found]             ` <52665A1E.5020700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-22 11:02               ` Mark Rutland
2013-10-22 11:02               ` Jamie Iles

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