pwm: sifive: Reduce time the controller lock is held
stable inclusion from stable-v5.10.173 commit 8b98e7a45e6382b75cacf7932bcdb27482a56e49 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8b98e7a45e6382b75cacf7932bcdb27482a56e49 -------------------------------- [ Upstream commit 0f02f491 ] The lock is only to serialize access and update to user_count and approx_period between different PWMs served by the same pwm_chip. So the lock needs only to be taken during the check if the (chip global) period can and/or needs to be changed. 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> Stable-dep-of: 334c7b13 ("pwm: sifive: Always let the first pwm_apply_state succeed") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment