]> Gentwo Git Trees - linux/.git/commit
pwm: Disable PWM_DEBUG check for disabled states
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 8 Jul 2025 17:18:00 +0000 (19:18 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Mon, 15 Sep 2025 09:39:44 +0000 (11:39 +0200)
commit5364e70b013c204088dfcd888a5517a81f0b1836
treed17669517d4f906bd3357dd6f331a5a395a85a40
parent09cbe54681241ac67ca595743d29f7da85363928
pwm: Disable PWM_DEBUG check for disabled states

When a PWM is requested to be disabled, the result is unspecified, the only
intention is to save some power. So skip all checks in this case.

All but two checks already only triggered for states with .enabled = true.
The first resulted in some false positive diagnostics, the other checked
for a condition that depending on hardware might not be implementable.

Similar if the lowlevel driver disabled the hardware this might be a valid
reaction and with .enabled = false all other state parameters are
unreliable, so skip further tests in this case, too.

All later usages of .enabled can be assumed to yield true, and so several
if conditions can be simplified.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/16d29212b09b66c286c1232b1ab0ec0f8d510aae.1751994988.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c