Skip to contentSkip to conversation

dt-bindings: mfd: da9063: watchdog: add suspend disable option

PATCH In review Primoz Fiser 4 participants 15 messages Apr 22, 2022 – May 14, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dt-bindings: mfd: da9063: watchdog: add suspend disable option

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
 Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +6 -3
index 91b79a21d403..aa8b800cc4ad 100644
@@ -64,10 +64,13 @@ Sub-nodes:
     and KEY_SLEEP.
 
 - watchdog : This node defines settings for the Watchdog timer associated
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.
+  with the DA9063 and DA9063L. The node should contain the compatible property
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
 Example:
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 watchdog: da9063: optionally disable watchdog during suspend

Optionally disable watchdog during suspend (if enabled) and re-enable it upon resume.
This enables boards to sleep without being interrupted by the watchdog.

This patch is based on commit f6c98b08381c ("watchdog: da9062: add power management ops") and commit 8541673d2a5f ("watchdog: da9062: fix power management ops") and brings the same functionality to DA9063.

---
 drivers/watchdog/da9063_wdt.c | 36 +++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/watchdog/da9063_wdt.c +36 -0
index 9adad1862bbd..09a4af4c58fc 100644
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/mfd/da9063/registers.h>
 #include <linux/mfd/da9063/core.h>
+#include <linux/property.h>
 #include <linux/regmap.h>
 
 /*
@@ -26,6 +27,8 @@
  *   others: timeout = 2048 ms * 2^(TWDSCALE-1).
  */
 static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
+static bool use_sw_pm;
+
 #define DA9063_TWDSCALE_DISABLE		0
 #define DA9063_TWDSCALE_MIN		1
 #define DA9063_TWDSCALE_MAX		(ARRAY_SIZE(wdt_timeout) - 1)
@@ -218,6 +221,8 @@ static int da9063_wdt_probe(struct platform_device *pdev)
 	if (!wdd)
 		return -ENOMEM;
 
+	use_sw_pm = device_property_present(dev, "dlg,use-sw-pm");
+
 	wdd->info = &da9063_watchdog_info;
 	wdd->ops = &da9063_watchdog_ops;
 	wdd->min_timeout = DA9063_WDT_MIN_TIMEOUT;
@@ -228,6 +233,7 @@ static int da9063_wdt_probe(struct platform_device *pdev)
 
 	watchdog_set_restart_priority(wdd, 128);
 	watchdog_set_drvdata(wdd, da9063);
+	dev_set_drvdata(dev, wdd);
 
 	wdd->timeout = DA9063_WDG_TIMEOUT;
 
@@ -249,10 +255,40 @@ static int da9063_wdt_probe(struct platform_device *pdev)
 	return devm_watchdog_register_device(dev, wdd);
 }
 
+static int __maybe_unused da9063_wdt_suspend(struct device *dev)
+{
+	struct watchdog_device *wdd = dev_get_drvdata(dev);
+
+	if (!use_sw_pm)
+		return 0;
+
+	if (watchdog_active(wdd))
+		return da9063_wdt_stop(wdd);
+
+	return 0;
+}
+
+static int __maybe_unused da9063_wdt_resume(struct device *dev)
+{
+	struct watchdog_device *wdd = dev_get_drvdata(dev);
+
+	if (!use_sw_pm)
+		return 0;
+
+	if (watchdog_active(wdd))
+		return da9063_wdt_start(wdd);
+
+	return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(da9063_wdt_pm_ops,
+			da9063_wdt_suspend, da9063_wdt_resume);
+
 static struct platform_driver da9063_wdt_driver = {
 	.probe = da9063_wdt_probe,
 	.driver = {
 		.name = DA9063_DRVNAME_WATCHDOG,
+		.pm = &da9063_wdt_pm_ops,
 	},
 };
 module_platform_driver(da9063_wdt_driver);
Signature · 1 line
2.25.1
#2 lore raw

RE: [PATCH 2/3] watchdog: da9063: optionally disable watchdog during suspend

Quoted 7 lines · Primoz Fiser

Optionally disable watchdog during suspend (if enabled) and re-enable it upon resume.
This enables boards to sleep without being interrupted by the watchdog.

This patch is based on commit f6c98b08381c ("watchdog: da9062: add power management ops") and commit 8541673d2a5f ("watchdog: da9062: fix power management ops") and brings the same functionality to DA9063.

There's a WATCHDOG_PD bit (set to 0) to achieve this I believe, and thus removes the need for the suspend/resume PM functions. Is this something you've tried? Also seems to be present for DA9061/2 as well so can't remember why that wasn't used there.

#3 lore raw

Re: [PATCH 2/3] watchdog: da9063: optionally disable watchdog during suspend

Quoted 6 lines · DLG Adam Thomson
Quoted 4 lines · Primoz Fiser

Optionally disable watchdog during suspend (if enabled) and re-enable it upon resume.
This enables boards to sleep without being interrupted by the watchdog.

Quoted 8 lines
Quoted 3 lines

This patch is based on commit f6c98b08381c ("watchdog: da9062: add power management ops") and commit 8541673d2a5f ("watchdog: da9062: fix power management ops") and brings the same functionality to DA9063.

There's a WATCHDOG_PD bit (set to 0) to achieve this I believe, and thus removes the need for the suspend/resume PM functions. Is this something you've tried? Also seems to be present for DA9061/2 as well so can't remember why that wasn't used there.

Ideally one should be able to use WATCHDOG_PD bit indeed.

However there are boards out there which don't have the ability to use the PMIC's powerdown/active mode due to PCB design and thus PMIC is left enabled during suspend i.e. cannot use the POWERDOWN mode.

Check mailing list correspondence [1] which already gave explanation why there was a need to implement such quirks for da9062 and the need to handle this in software instead of hardware.

Links:

[1] https://lore.kernel.org/all/[email protected]/

Reviewed-by
#4 lore raw

RE: [PATCH 2/3] watchdog: da9063: optionally disable watchdog during suspend

Quoted 21 lines · Primoz Fiser
Quoted 10 lines
Quoted 7 lines

Optionally disable watchdog during suspend (if enabled) and re-enable it upon resume.
This enables boards to sleep without being interrupted by the watchdog.

This patch is based on commit f6c98b08381c ("watchdog: da9062: add power management ops") and commit 8541673d2a5f ("watchdog: da9062: fix power management ops") and brings the same functionality to DA9063.

There's a WATCHDOG_PD bit (set to 0) to achieve this I believe, and thus removes the need for the suspend/resume PM functions. Is this something

you've

Quoted 1 line

tried? Also seems to be present for DA9061/2 as well so can't remember why

that

Quoted 1 line

wasn't used there.

Ideally one should be able to use WATCHDOG_PD bit indeed.

However there are boards out there which don't have the ability to use the PMIC's powerdown/active mode due to PCB design and thus PMIC is left enabled during suspend i.e. cannot use the POWERDOWN mode.

Quoted 8 lines

Check mailing list correspondence [1] which already gave explanation why there was a need to implement such quirks for da9062 and the need to handle this in software instead of hardware.

Links:

[1]
https://lore.kernel.org/all/[email protected]/

At least I'm consistent in my first response :)

Yes I remember the discussion now. Thanks for the reminder. In which case:

maintainer Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] watchdog: da9063: optionally disable watchdog during suspend

In reply to Primoz Fiser
Quoted 10 lines · Primoz Fiser

Optionally disable watchdog during suspend (if enabled) and re-enable it upon resume.
This enables boards to sleep without being interrupted by the watchdog.

This patch is based on commit f6c98b08381c ("watchdog: da9062: add power management ops") and commit 8541673d2a5f ("watchdog: da9062: fix power management ops") and brings the same functionality to DA9063.

Quoted 83 lines
---
 drivers/watchdog/da9063_wdt.c | 36 +++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/watchdog/da9063_wdt.c +36 -0
index 9adad1862bbd..09a4af4c58fc 100644
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/mfd/da9063/registers.h>
 #include <linux/mfd/da9063/core.h>
+#include <linux/property.h>
 #include <linux/regmap.h>
 
 /*
@@ -26,6 +27,8 @@
  *   others: timeout = 2048 ms * 2^(TWDSCALE-1).
  */
 static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
+static bool use_sw_pm;
+
 #define DA9063_TWDSCALE_DISABLE		0
 #define DA9063_TWDSCALE_MIN		1
 #define DA9063_TWDSCALE_MAX		(ARRAY_SIZE(wdt_timeout) - 1)
@@ -218,6 +221,8 @@ static int da9063_wdt_probe(struct platform_device *pdev)
 	if (!wdd)
 		return -ENOMEM;
 
+	use_sw_pm = device_property_present(dev, "dlg,use-sw-pm");
+
 	wdd->info = &da9063_watchdog_info;
 	wdd->ops = &da9063_watchdog_ops;
 	wdd->min_timeout = DA9063_WDT_MIN_TIMEOUT;
@@ -228,6 +233,7 @@ static int da9063_wdt_probe(struct platform_device *pdev)
 
 	watchdog_set_restart_priority(wdd, 128);
 	watchdog_set_drvdata(wdd, da9063);
+	dev_set_drvdata(dev, wdd);
 
 	wdd->timeout = DA9063_WDG_TIMEOUT;
 
@@ -249,10 +255,40 @@ static int da9063_wdt_probe(struct platform_device *pdev)
 	return devm_watchdog_register_device(dev, wdd);
 }
 
+static int __maybe_unused da9063_wdt_suspend(struct device *dev)
+{
+	struct watchdog_device *wdd = dev_get_drvdata(dev);
+
+	if (!use_sw_pm)
+		return 0;
+
+	if (watchdog_active(wdd))
+		return da9063_wdt_stop(wdd);
+
+	return 0;
+}
+
+static int __maybe_unused da9063_wdt_resume(struct device *dev)
+{
+	struct watchdog_device *wdd = dev_get_drvdata(dev);
+
+	if (!use_sw_pm)
+		return 0;
+
+	if (watchdog_active(wdd))
+		return da9063_wdt_start(wdd);
+
+	return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(da9063_wdt_pm_ops,
+			da9063_wdt_suspend, da9063_wdt_resume);
+
 static struct platform_driver da9063_wdt_driver = {
 	.probe = da9063_wdt_probe,
 	.driver = {
 		.name = DA9063_DRVNAME_WATCHDOG,
+		.pm = &da9063_wdt_pm_ops,
 	},
 };
 module_platform_driver(da9063_wdt_driver);
#6 lore raw

PATCH 3/3 ARM: dts: imx6: phyFLEX: disable da9063 watchdog during suspend

In reply to Primoz Fiser

If DA9063 PMIC is left enabled during suspend, PMIC's watchdog needs to be disabled before entering suspended state to allow board to sleep for longer period than the watchdog timeout period. Otherwise board will be reset by the watchdog. Thus disable watchdog on suspend and re-enable it upon resume.

---
 arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi +1 -0
index 1f2ba6f6254e..56b29c3294c6 100644
@@ -212,6 +212,7 @@ da9063_rtc: rtc {
 
 		da9063_wdog: watchdog {
 			compatible = "dlg,da9063-watchdog";
+			dlg,use-sw-pm;
 		};
 
 		onkey {
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 3/3
#7 lore raw

Re: [PATCH 3/3] ARM: dts: imx6: phyFLEX: disable da9063 watchdog during suspend

Quoted 7 lines · Primoz Fiser

If DA9063 PMIC is left enabled during suspend, PMIC's watchdog needs to be disabled before entering suspended state to allow board to sleep for longer period than the watchdog timeout period. Otherwise board will be reset by the watchdog. Thus disable watchdog on suspend and re-enable it upon resume.

Quoted 16 lines
---
 arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi +1 -0
index 1f2ba6f6254e..56b29c3294c6 100644
@@ -212,6 +212,7 @@ da9063_rtc: rtc {
 
 		da9063_wdog: watchdog {
 			compatible = "dlg,da9063-watchdog";
+			dlg,use-sw-pm;
 		};
 
 		onkey {
maintainer
#8 lore raw
In reply to Primoz Fiser
Quoted 17 lines · Primoz Fiser

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
 Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
index 91b79a21d403..aa8b800cc4ad 100644
@@ -64,10 +64,13 @@ Sub-nodes:
     and KEY_SLEEP.

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 71

Quoted 10 lines
Documentation/devicetree/bindings/mfd/da9063.txt +4 -3
 
 - watchdog : This node defines settings for the Watchdog timer associated
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.
+  with the DA9063 and DA9063L. The node should contain the compatible property
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.

Name the property based on the h/w quirk rather than what to do in response. Something like 'dlg,hw-suspend-broken'

Quoted 9 lines
Documentation/devicetree/bindings/mfd/da9063.txt +2 -0
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
 Example:
 
Signature · 1 line
2.25.1
#9 lore raw

Hi Rob,

Quoted 2 lines
Quoted 2 lines

Name the property based on the h/w quirk rather than what to do in response. Something like 'dlg,hw-suspend-broken'

Shouldn't we match da9062's property?

As this commit is based on c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option") which uses "dlg,use-sw-pm" as property to implement the same functionality.

Sure I can spin up v2 with your proposal but I think that would create unnecessary ambiguity and confusion?

For example, phyCORE board uses da9062 PMIC while phyFLEX uses da9063 as PMIC. Boards are from the same SoM vendor. So one board would have to use "dlg,use-sw-pm" and the other one "dlg,hw-suspend-broken" property to achieve the same thing?

Quoted 41 lines · Rob Herring
Quoted 17 lines · Primoz Fiser

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
  Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
index 91b79a21d403..aa8b800cc4ad 100644
@@ -64,10 +64,13 @@ Sub-nodes:
      and KEY_SLEEP.

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 71

Quoted 10 lines
Documentation/devicetree/bindings/mfd/da9063.txt +4 -3
 
  - watchdog : This node defines settings for the Watchdog timer associated
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.
+  with the DA9063 and DA9063L. The node should contain the compatible property
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.

Name the property based on the h/w quirk rather than what to do in response. Something like 'dlg,hw-suspend-broken'

Quoted 9 lines
Documentation/devicetree/bindings/mfd/da9063.txt +2 -0
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
  Example:
 
Signature · 1 line
2.25.1
maintainer Reviewed-by
#10 lore raw
Quoted 2 lines · Primoz Fiser

Hi Rob,

Please don't top post. Trim any irrelevant parts and reply below the original quoted text.

Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Name the property based on the h/w quirk rather than what to do in response. Something like 'dlg,hw-suspend-broken'

Shouldn't we match da9062's property?

Ah, yes. I failed to grasp that from the 'based on commit...' in the commit msg.

Quoted 4 lines

As this commit is based on c514430c51ee8 ("dt-bindings: watchdog: da9062:
add suspend disable option") which uses "dlg,use-sw-pm" as property to implement the same functionality.

The 'which uses "dlg,use-sw-pm" as property to implement the same functionality' part would be useful in the commit msg. With that,

Quoted 48 lines

Sure I can spin up v2 with your proposal but I think that would create unnecessary ambiguity and confusion?

For example, phyCORE board uses da9062 PMIC while phyFLEX uses da9063 as PMIC. Boards are from the same SoM vendor. So one board would have to use "dlg,use-sw-pm" and the other one "dlg,hw-suspend-broken" property to achieve the same thing?

Quoted 37 lines · Rob Herring
Quoted 16 lines · Primoz Fiser

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
  Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
index 91b79a21d403..aa8b800cc4ad 100644

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 69

Quoted 9 lines
Documentation/devicetree/bindings/mfd/da9063.txt +4 -3
@@ -64,10 +64,13 @@ Sub-nodes:
      and KEY_SLEEP.
  - watchdog : This node defines settings for the Watchdog timer associated
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.
+  with the DA9063 and DA9063L. The node should contain the compatible property
+  with the value "dlg,da9063-watchdog".
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.

Name the property based on the h/w quirk rather than what to do in response. Something like 'dlg,hw-suspend-broken'

Quoted 7 lines
Documentation/devicetree/bindings/mfd/da9063.txt +2 -0
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
  Example:
Signature · 1 line
2.25.1
#11 lore raw
In reply to Primoz Fiser
Quoted 17 lines · Primoz Fiser

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
 Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
index 91b79a21d403..aa8b800cc4ad 100644

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 66

Quoted 3 lines
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
@@ -64,10 +64,13 @@ Sub-nodes:
     and KEY_SLEEP.
 
 - watchdog : This node defines settings for the Watchdog timer associated

I don't know if this is just me, but it looks like you're deleting this line above, but not replacing it.....

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 69

Quoted 3 lines
Documentation/devicetree/bindings/mfd/da9063.txt +0 -3
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.

....here, if I'm reading this patch correctly. This means we're losing that property description, and starting a text block with the below text.

Quoted 13 lines
Documentation/devicetree/bindings/mfd/da9063.txt +1 -0
+  with the DA9063 and DA9063L. The node should contain the compatible

property

Documentation/devicetree/bindings/mfd/da9063.txt +5 -1
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
 Example:
 
--

2.25.1

#12 lore raw
Quoted 21 lines · DLG Adam Thomson
Quoted 19 lines · Primoz Fiser

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
  Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
index 91b79a21d403..aa8b800cc4ad 100644
@@ -64,10 +64,13 @@ Sub-nodes:
      and KEY_SLEEP.
 
Quoted 4 lines

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 66

Quoted 1 line
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
  - watchdog : This node defines settings for the Watchdog timer associated

I don't know if this is just me, but it looks like you're deleting this line above, but not replacing it.....

I am not deleting this line, please note the leading white-space.

But yeah, if you don't pay close attention it looks a bit confusing indeed :)

Quoted 22 lines

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 69

Quoted 4 lines
Documentation/devicetree/bindings/mfd/da9063.txt +0 -3
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.

....here, if I'm reading this patch correctly. This means we're losing that property description, and starting a text block with the below text.

Quoted 13 lines
Documentation/devicetree/bindings/mfd/da9063.txt +1 -0
+  with the DA9063 and DA9063L. The node should contain the compatible

property

Documentation/devicetree/bindings/mfd/da9063.txt +5 -1
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
  Example:
 
--

2.25.1

Would you like:

The node should contain the compatible property with the value compatible = "dlg,da9063-watchdog".

i.e. explicitly adding "compatible =" in front, for v2?

Reviewed-by
#13 lore raw
Quoted 24 lines · Primoz Fiser
Quoted 19 lines
Quoted 19 lines

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

---
  Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
index 91b79a21d403..aa8b800cc4ad 100644
@@ -64,10 +64,13 @@ Sub-nodes:
      and KEY_SLEEP.
 
Quoted 4 lines

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 66

Quoted 1 line
Documentation/devicetree/bindings/mfd/da9063.txt +0 -0
  - watchdog : This node defines settings for the Watchdog timer associated

I don't know if this is just me, but it looks like you're deleting this line above, but not replacing it.....

Quoted 4 lines

I am not deleting this line, please note the leading white-space.

But yeah, if you don't pay close attention it looks a bit confusing indeed :)

There you go. Thought it would be a strange deletion. Ignore me :)

Quoted 24 lines
Quoted 23 lines

Documentation/devicetree/bindings/mfd/da9063.txt Sub-nodes: · line 69

Quoted 5 lines
Documentation/devicetree/bindings/mfd/da9063.txt +0 -3
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.

....here, if I'm reading this patch correctly. This means we're losing that property description, and starting a text block with the below text.

Quoted 13 lines
Documentation/devicetree/bindings/mfd/da9063.txt +1 -0
+  with the DA9063 and DA9063L. The node should contain the compatible

property

Documentation/devicetree/bindings/mfd/da9063.txt +5 -1
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
  Example:
 
--

2.25.1

Quoted 6 lines

Would you like:

The node should contain the compatible property with the value compatible = "dlg,da9063-watchdog".

i.e. explicitly adding "compatible =" in front, for v2?

No change necessary. It just looked odd when I thought that first line was being deleted. Given that's not the case:

maintainer Reviewed-by on v1 1/3
#14 lore raw
In reply to Primoz Fiser
Quoted 9 lines · Primoz Fiser

Document the watchdog disable option which can be used if the hardware automatic suspend option is broken.

Based on commit c514430c51ee8 ("dt-bindings: watchdog: da9062: add suspend disable option").

Quoted 25 lines
---
 Documentation/devicetree/bindings/mfd/da9063.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +6 -3
index 91b79a21d403..aa8b800cc4ad 100644
@@ -64,10 +64,13 @@ Sub-nodes:
     and KEY_SLEEP.
 
 - watchdog : This node defines settings for the Watchdog timer associated
-  with the DA9063 and DA9063L. There are currently no entries in this
-  binding, however compatible = "dlg,da9063-watchdog" should be added
-  if a node is created.
+  with the DA9063 and DA9063L. The node should contain the compatible property
+  with the value "dlg,da9063-watchdog".
 
+  Optional watchdog properties:
+  - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
+  Only use this option if you can't use the watchdog automatic suspend
+  function during a suspend (see register CONTROL_B).
 
 Example: