]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: sifive: Reduce time the controller lock is held
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 21 Jul 2022 10:31:25 +0000 (12:31 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 29 Jul 2022 11:40:50 +0000 (13:40 +0200)
commite711c758629bd2899aaaba4864351c752977b891
tree07814e78bc55f22be616078902b505c647501b8e
parent782267201b7a40d0a2fb49f3365d3fd935135f19
pwm: sifive: Reduce time the controller lock is held

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>
drivers/pwm/pwm-sifive.c