]> 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)
commit11e6765a37112b11dbc599305c9897df17f6215d
tree2caabbb740fd56733a34937e895ed70076ffdd6e
parente0ca9013058e7e7c43370e859619dd81765769b0
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