pwm: bcm-kona: Implement .apply() callback
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 3 Dec 2021 22:58:59 +0000 (23:58 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 24 Feb 2022 12:53:13 +0000 (13:53 +0100)
commit1c1283db07993d0246865abe03765ac09171107b
treeb7065cbb2de04a920373fe5674151577803fa2b0
parent5f027d9b83dbb8c3f9c61c8a53363df86d158a32
pwm: bcm-kona: Implement .apply() callback

To eventually get rid of all legacy drivers convert this driver to the
modern world implementing .apply().

The conversion wasn't quite straight forward because .config() and
.enable() were special to effectively swap their usual order. This resulted
in calculating the required values twice in some cases when
pwm_apply_state() was called. This is optimized en passant, and the order
of the callbacks is preserved without special jumping through hoops.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-bcm-kona.c