OSDN Git Service

pwm: Introduce single-PWM of_xlate function
authorBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 25 Oct 2021 17:09:23 +0000 (10:09 -0700)
committerRobert Foss <robert.foss@linaro.org>
Wed, 27 Oct 2021 15:02:33 +0000 (17:02 +0200)
commit3ab7b6ac5d829e60c3b89d415811ff1c9f358c8e
tree74d922d811a868dac6cc67c92a3e038920089354
parent086b90c76fc18246b03aaf728d2f30a1a018a1b4
pwm: Introduce single-PWM of_xlate function

The existing pxa driver and the upcoming addition of PWM support in the
TI sn565dsi86 DSI/eDP bridge driver both has a single PWM channel and
thereby a need for a of_xlate function with the period as its single
argument.

Introduce a common helper function in the core that can be used as
of_xlate by such drivers and migrate the pxa driver to use this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-By: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211025170925.3096444-1-bjorn.andersson@linaro.org
drivers/pwm/core.c
drivers/pwm/pwm-pxa.c
include/linux/pwm.h