[PATCH 1/3] pwm: Add upgrade path to #pwm-cells = <3> for users of of_pwm_single_xlate()
Herve Codina
herve.codina at bootlin.com
Wed Feb 5 10:02:40 PST 2025
On Wed, 5 Feb 2025 18:54:00 +0100
Uwe Kleine-König <u.kleine-koenig at baylibre.com> wrote:
> 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>.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
> ---
> drivers/pwm/core.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
Reviewed-by: Herve Codina <herve.codina at bootlin.com>
Best regards,
Hervé
More information about the linux-arm-kernel
mailing list