Skip to content

Commit 33d04d0

Browse files
bijudasWim Van Sebroeck
authored andcommitted
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: 2cbc5cd ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Biju Das <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent e4cf895 commit 33d04d0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/watchdog/rzg2l_wdt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev)
8888
{
8989
struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
9090

91-
reset_control_deassert(priv->rstc);
9291
pm_runtime_get_sync(wdev->parent);
9392

9493
/* Initialize time out */
@@ -108,7 +107,7 @@ static int rzg2l_wdt_stop(struct watchdog_device *wdev)
108107
struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
109108

110109
pm_runtime_put(wdev->parent);
111-
reset_control_assert(priv->rstc);
110+
reset_control_reset(priv->rstc);
112111

113112
return 0;
114113
}

0 commit comments

Comments
 (0)