]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: sifive: Enable clk only after period check in .apply()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 21 Jul 2022 10:31:26 +0000 (12:31 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 29 Jul 2022 11:40:54 +0000 (13:40 +0200)
commit3b0904757a056729a432ec802c45999f7753a986
tree2caabbb740fd56733a34937e895ed70076ffdd6e
parente711c758629bd2899aaaba4864351c752977b891
pwm: sifive: Enable clk only after period check in .apply()

For the period check and the initial calculations of register values there
is no hardware access needed. So delay enabling the clk a bit to simplify
the code flow a bit.

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