summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2019-06-19 11:52:02 +0200
committerThierry Reding <thierry.reding@gmail.com>2019-06-25 14:53:51 +0200
commit0b055ed4c9bc16217d5eb4f4e6a5446cd9631b87 (patch)
tree9d448f134802dc28c26aff3b78646d8e8269200b /drivers/pwm
parent69252ec16596ae679bbfc29dfe64682c17ea4dc0 (diff)
downloadlinux-0b055ed4c9bc16217d5eb4f4e6a5446cd9631b87.tar.bz2
pwm: stm32: Use 3 cells ->of_xlate()
STM32 Timers support generic 3 cells PWM to encode PWM number, period and polarity. Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm") Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@st.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-stm32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 4f842550fbd1..740e2dec8313 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -608,6 +608,8 @@ static int stm32_pwm_probe(struct platform_device *pdev)
priv->regmap = ddata->regmap;
priv->clk = ddata->clk;
priv->max_arr = ddata->max_arr;
+ priv->chip.of_xlate = of_pwm_xlate_with_flags;
+ priv->chip.of_pwm_n_cells = 3;
if (!priv->regmap || !priv->clk)
return -EINVAL;