watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused
authorVignesh Raghavendra <vigneshr@ti.com>
Wed, 13 Dec 2023 14:01:10 +0000 (19:31 +0530)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 17 Dec 2023 15:14:24 +0000 (16:14 +0100)
commitc1a6edf3b541e44e78f10bc6024df779715723f1
tree55238a9390a0a37a3f63f3aba5599defbdcf1fd5
parentf77999887235f8c378af343df11a6bcedda5b284
watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused

Call runtime_pm_put*() if watchdog is not already started during probe and re
enable it in watchdog start as required.

On K3 SoCs, watchdogs and their corresponding CPUs are under same
power-domain, so if the reference count of unused watchdogs aren't
dropped, it will lead to CPU hotplug failures as Device Management
firmware won't allow to turn off the power-domain due to dangling
reference count.

Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Tested-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20231213140110.938129-1-vigneshr@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/rti_wdt.c