Skip to content

Commit

Permalink
pwm: imx27: Don't disable clocks at device remove time
Browse files Browse the repository at this point in the history
The .remove() callback is not supposed to modify hardware state. This is
in the responsibility of the PWM consumer.

After the PWM was disabled the clocks are off (apart from a bug that is
fixed in the next patch), so unbinding the driver either stops the PWM
(which it should not) or disables already disabled clocks yielding
warnings from the clk core.

So just drop the call to disable the clocks. (Which BTW was also in the
wrong order because the call makes the PWM unfunctional and so should
have come only after pwmchip_remove()).

Fixes: 9f4c8f9 ("pwm: imx: Add ipg clock operation")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Uwe Kleine-König authored and Thierry Reding committed Mar 30, 2020
1 parent aad4e53 commit 4563654
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/pwm/pwm-imx27.c
Original file line number Diff line number Diff line change
@@ -358,8 +358,6 @@ static int pwm_imx27_remove(struct platform_device *pdev)

imx = platform_get_drvdata(pdev);

pwm_imx27_clk_disable_unprepare(imx);

return pwmchip_remove(&imx->chip);
}

0 comments on commit 4563654

Please sign in to comment.