* [PATCH v2] watchdog: da9063_wdt: don't trigger watchdog too fast
@ 2016-07-06 8:40 Stefan Christ
2016-07-06 18:19 ` Guenter Roeck
2016-07-17 20:18 ` Wim Van Sebroeck
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Christ @ 2016-07-06 8:40 UTC (permalink / raw)
To: linux, linux-watchdog
Triggering the watchdog faster than T_WDMIN=256ms leads to resets of the
DA9063 chip. The datasheet says that the watchdog must only be triggered
in the timeframe T_WDMIN to T_WDMAX. The T_WDMAX is configured in the
driver.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
v2: use internal kernel API 'min_hw_heartbeat_ms' instead of driver specific
implementation.
Hi,
this is a follow up patch to the patch
[RFC 1/6] watchdog: da9063_wdt: don't trigger watchdog too fast
in my RFC patch series. Using the internal kernel watchdog API also makes my
second patch
[RFC 2/6] watchdog: da9063_wdt: use delayed work to trigger
obsolete, because the kernel API uses a delayed worker already.
Kind regards,
Stefan Christ
---
drivers/watchdog/da9063_wdt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
index a100f64..5d6b4e5 100644
--- a/drivers/watchdog/da9063_wdt.c
+++ b/drivers/watchdog/da9063_wdt.c
@@ -34,6 +34,7 @@ static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
#define DA9063_WDT_MIN_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MIN]
#define DA9063_WDT_MAX_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MAX]
#define DA9063_WDG_TIMEOUT wdt_timeout[3]
+#define DA9063_RESET_PROTECTION_MS 256
struct da9063_watchdog {
struct da9063 *da9063;
@@ -171,6 +172,7 @@ static int da9063_wdt_probe(struct platform_device *pdev)
wdt->wdtdev.ops = &da9063_watchdog_ops;
wdt->wdtdev.min_timeout = DA9063_WDT_MIN_TIMEOUT;
wdt->wdtdev.max_timeout = DA9063_WDT_MAX_TIMEOUT;
+ wdt->wdtdev.min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS;
wdt->wdtdev.timeout = DA9063_WDG_TIMEOUT;
wdt->wdtdev.parent = &pdev->dev;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] watchdog: da9063_wdt: don't trigger watchdog too fast
2016-07-06 8:40 [PATCH v2] watchdog: da9063_wdt: don't trigger watchdog too fast Stefan Christ
@ 2016-07-06 18:19 ` Guenter Roeck
2016-07-17 20:18 ` Wim Van Sebroeck
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2016-07-06 18:19 UTC (permalink / raw)
To: Stefan Christ; +Cc: linux-watchdog
On Wed, Jul 06, 2016 at 10:40:11AM +0200, Stefan Christ wrote:
> Triggering the watchdog faster than T_WDMIN=256ms leads to resets of the
> DA9063 chip. The datasheet says that the watchdog must only be triggered
> in the timeframe T_WDMIN to T_WDMAX. The T_WDMAX is configured in the
> driver.
>
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: use internal kernel API 'min_hw_heartbeat_ms' instead of driver specific
> implementation.
>
> Hi,
>
> this is a follow up patch to the patch
>
> [RFC 1/6] watchdog: da9063_wdt: don't trigger watchdog too fast
>
> in my RFC patch series. Using the internal kernel watchdog API also makes my
> second patch
>
> [RFC 2/6] watchdog: da9063_wdt: use delayed work to trigger
>
> obsolete, because the kernel API uses a delayed worker already.
>
> Kind regards,
> Stefan Christ
> ---
> drivers/watchdog/da9063_wdt.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
> index a100f64..5d6b4e5 100644
> --- a/drivers/watchdog/da9063_wdt.c
> +++ b/drivers/watchdog/da9063_wdt.c
> @@ -34,6 +34,7 @@ static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
> #define DA9063_WDT_MIN_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MIN]
> #define DA9063_WDT_MAX_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MAX]
> #define DA9063_WDG_TIMEOUT wdt_timeout[3]
> +#define DA9063_RESET_PROTECTION_MS 256
>
> struct da9063_watchdog {
> struct da9063 *da9063;
> @@ -171,6 +172,7 @@ static int da9063_wdt_probe(struct platform_device *pdev)
> wdt->wdtdev.ops = &da9063_watchdog_ops;
> wdt->wdtdev.min_timeout = DA9063_WDT_MIN_TIMEOUT;
> wdt->wdtdev.max_timeout = DA9063_WDT_MAX_TIMEOUT;
> + wdt->wdtdev.min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS;
> wdt->wdtdev.timeout = DA9063_WDG_TIMEOUT;
> wdt->wdtdev.parent = &pdev->dev;
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] watchdog: da9063_wdt: don't trigger watchdog too fast
2016-07-06 8:40 [PATCH v2] watchdog: da9063_wdt: don't trigger watchdog too fast Stefan Christ
2016-07-06 18:19 ` Guenter Roeck
@ 2016-07-17 20:18 ` Wim Van Sebroeck
1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2016-07-17 20:18 UTC (permalink / raw)
To: Stefan Christ; +Cc: linux, linux-watchdog
Hi Stefan,
> Triggering the watchdog faster than T_WDMIN=256ms leads to resets of the
> DA9063 chip. The datasheet says that the watchdog must only be triggered
> in the timeframe T_WDMIN to T_WDMAX. The T_WDMAX is configured in the
> driver.
>
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> ---
> v2: use internal kernel API 'min_hw_heartbeat_ms' instead of driver specific
> implementation.
>
> Hi,
>
> this is a follow up patch to the patch
>
> [RFC 1/6] watchdog: da9063_wdt: don't trigger watchdog too fast
>
> in my RFC patch series. Using the internal kernel watchdog API also makes my
> second patch
>
> [RFC 2/6] watchdog: da9063_wdt: use delayed work to trigger
>
> obsolete, because the kernel API uses a delayed worker already.
>
> Kind regards,
> Stefan Christ
> ---
> drivers/watchdog/da9063_wdt.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
> index a100f64..5d6b4e5 100644
> --- a/drivers/watchdog/da9063_wdt.c
> +++ b/drivers/watchdog/da9063_wdt.c
> @@ -34,6 +34,7 @@ static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
> #define DA9063_WDT_MIN_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MIN]
> #define DA9063_WDT_MAX_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MAX]
> #define DA9063_WDG_TIMEOUT wdt_timeout[3]
> +#define DA9063_RESET_PROTECTION_MS 256
>
> struct da9063_watchdog {
> struct da9063 *da9063;
> @@ -171,6 +172,7 @@ static int da9063_wdt_probe(struct platform_device *pdev)
> wdt->wdtdev.ops = &da9063_watchdog_ops;
> wdt->wdtdev.min_timeout = DA9063_WDT_MIN_TIMEOUT;
> wdt->wdtdev.max_timeout = DA9063_WDT_MAX_TIMEOUT;
> + wdt->wdtdev.min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS;
> wdt->wdtdev.timeout = DA9063_WDG_TIMEOUT;
> wdt->wdtdev.parent = &pdev->dev;
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
This patch has been added to linux-watchdog-next.
Kind regards,
Wim.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-17 20:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 8:40 [PATCH v2] watchdog: da9063_wdt: don't trigger watchdog too fast Stefan Christ
2016-07-06 18:19 ` Guenter Roeck
2016-07-17 20:18 ` Wim Van Sebroeck
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.