bus: ti-sysc: Fix warnings for unbind for serial
authorTony Lindgren <tony@atomide.com>
Thu, 12 May 2022 05:30:21 +0000 (08:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:09 +0000 (18:36 +0200)
commit40960520a94004a1ceca5470c2efbdc58b6197cc
treedfc4ac40f209dd7c24b6148668369bc0ee017868
parentfdffa4ad8f6bf1ece877edfb807f2b2c729d8578
bus: ti-sysc: Fix warnings for unbind for serial

[ Upstream commit c337125b8834f9719dfda0e40b25eaa266f1b8cf ]

We can get "failed to disable" clock_unprepare warnings on unbind at least
for the serial console device if the unbind is done before the device has
been idled.

As some devices are using deferred idle, we must check the status for
pending idle work to idle the device.

Fixes: 76f0f772e469 ("bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init")
Cc: Romain Naour <romain.naour@smile.fr>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20220512053021.61650-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c