Re: [PATCH v4 1/2] watchdog: dw_wdt: use devm_reset_control_get_optional_shared_deasserted
From: Guenter Roeck
Date: Mon Oct 26 2026 - 19:01:12 EST
On Sat, Oct 24, 2026 at 05:08:50PM +0300, Artem Shimko wrote:
> Replace devm_reset_control_get_optional_shared() with
> devm_reset_control_get_optional_shared_deasserted() to let the
> device-managed API handle reset line deassertion and assertion
> automatically.
>
> The driver currently manages the reset control manually: it calls
> reset_control_deassert() during probe and reset_control_assert() in
> error paths and remove. This is error-prone and requires explicit
> cleanup in multiple places.
>
> Switching to the _deasserted variant deasserts the reset line on
> acquisition and asserts it again when the device is removed, which
> allows removing the out_assert_rst label along with the related
> assertions in the probe error paths and in dw_wdt_drv_remove().
>
> Tested-by: Igor Velkov <iav@xxxxxx>
> Reviewed-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
> Signed-off-by: Artem Shimko <a.shimko.dev@xxxxxxxxx>
Applied.
Thanks,
Guenter