pwm: sifive: Shut down hardware only after pwmchip_remove() completed
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 21 Jul 2022 10:31:29 +0000 (12:31 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 29 Jul 2022 11:41:13 +0000 (13:41 +0200)
commit2375e964d541bb09158cd2dff67b5d74e8de61cd
treee8bc12e39f8b49618218719fc6a4edfd3b7e30dc
parentace41d7564e655c39f709a78c035188a460c7cbd
pwm: sifive: Shut down hardware only after pwmchip_remove() completed

The PWMs are expected to be functional until pwmchip_remove() is called.
So disable the clks only afterwards.

Fixes: 9e37a53eb051 ("pwm: sifive: Add a driver for SiFive SoC PWM")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sifive.c