]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: Add upgrade path to #pwm-cells = <3> for users of of_pwm_single_xlate()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Thu, 6 Feb 2025 12:06:25 +0000 (13:06 +0100)
committerUwe Kleine-König <ukleinek@kernel.org>
Mon, 10 Feb 2025 18:27:44 +0000 (19:27 +0100)
commit895fe4537cc8586f51abb5c66524efaa42c29883
treebafe192378eecd979920b3bc4c57af9b7aff22ba
parente320a24059f8fd06c60a5cc295bcc53eff759d30
pwm: Add upgrade path to #pwm-cells = <3> for users of of_pwm_single_xlate()

The PWM chip on PXA only has a single output. Back when the device tree
binding was defined it was considered a good idea to not pass the PWM
line index as is done for all other PWM types as it would be always zero
anyhow and so doesn't add any value.

However for consistency reasons it is nice when all PWMs use the same
binding. For that reason let of_pwm_single_xlate() (i.e. the function
that implements the PXA behaviour) behave in the same way as
of_pwm_xlate_with_flags() for 3 (or more) parameters. With that in
place, the pxa-pwm binding can be updated to #pwm-cells = <3> without
breaking old device trees that stick to #pwm-cells = <1>.

Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Tested-by: Duje Mihanović <duje.mihanovic@skole.hr>
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/b33a84d3f073880e94fc303cd32ebe095eb5ce46.1738842938.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c