pwm: sifive: Ensure the clk is enabled exactly once per running PWM
.apply() assumes the clk to be for a given PWM iff the PWM is enabled. So make sure this is the case when .probe() completes. And in .remove() disable the according number of times. This fixes a clk enable/disable imbalance, if some PWMs are already running at probe time. Fixes: 9e37a53e (pwm: sifive: Add a driver for SiFive SoC PWM) Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: NEmil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Showing
想要评论请 注册 或 登录