]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pwm: atmel-tcb: Simplify checking the companion output
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 9 Jul 2024 10:18:06 +0000 (12:18 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 10 Jul 2024 15:55:12 +0000 (17:55 +0200)
commitc1330cb9a56d42632b1af54cda374e01e39dcc59
treeaa448f1bd4ab8a9ecd6cc2dcd7cd41454d8203a1
parent9dd42d019e6399e6e7d9e90759a61ff430625285
pwm: atmel-tcb: Simplify checking the companion output

The two outputs provided by the supported hardware share some settings,
so access to the other PWM is required when one of them is configured.

Instead of an explicit if to deterimine the other PWM just use
hwpwm ^ 1. Further atcbpwm is never NULL, so drop the corresponding
check.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20240709101806.52394-4-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-atmel-tcb.c