Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: rzg2l_wdt: Fix reset control imbalance

Both rzg2l_wdt_probe() and rzg2l_wdt_start() calls reset_control_
deassert() which results in a reset control imbalance.

This patch fixes reset control imbalance by removing reset_control_
deassert() from rzg2l_wdt_start() and replaces reset_control_assert with
reset_control_reset in rzg2l_wdt_stop() as watchdog module can be stopped
only by a module reset. This change will allow us to restart WDT after
stop() by configuring WDT timeout and enable registers.

Fixes: 2cbc5cd0b55fa2 ("watchdog: Add Watchdog Timer driver for RZ/G2L")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220225175320.11041-5-biju.das.jz@bp.renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Biju Das and committed by
Wim Van Sebroeck
33d04d0f e4cf8959

+1 -2
+1 -2
drivers/watchdog/rzg2l_wdt.c
··· 88 88 { 89 89 struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); 90 90 91 - reset_control_deassert(priv->rstc); 92 91 pm_runtime_get_sync(wdev->parent); 93 92 94 93 /* Initialize time out */ ··· 107 108 struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); 108 109 109 110 pm_runtime_put(wdev->parent); 110 - reset_control_assert(priv->rstc); 111 + reset_control_reset(priv->rstc); 111 112 112 113 return 0; 113 114 }