pwm: rockchip: Enable APB clock during register access while probing
Commit 457f74ab ("pwm: rockchip: Keep enabled PWMs running while probing") modified rockchip_pwm_probe() to access a PWM device's registers directly to check whether or not the device is enabled, but did not also change the function so it first enables the device's APB clock to be certain the device can respond. This risks hanging the kernel on systems with PWM devices that use more than a single clock. Avoid this by enabling the device's APB clock before accessing its registers (and disabling the clock when register access is complete). Fixes: 457f74ab ("pwm: rockchip: Keep enabled PWMs running while probing") Reported-by: NThierry Reding <thierry.reding@gmail.com> Suggested-by: NTrent Piepho <tpiepho@gmail.com> Signed-off-by: NSimon South <simon@simonsouth.net> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Showing
想要评论请 注册 或 登录