Commit 0b055ed4 authored by Fabrice Gasnier's avatar Fabrice Gasnier Committed by Thierry Reding

pwm: stm32: Use 3 cells ->of_xlate()

STM32 Timers support generic 3 cells PWM to encode PWM number, period
and polarity.

Fixes: 7edf7369 ("pwm: Add driver for STM32 plaftorm")
Signed-off-by: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: default avatarBenjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 69252ec1
...@@ -608,6 +608,8 @@ static int stm32_pwm_probe(struct platform_device *pdev) ...@@ -608,6 +608,8 @@ static int stm32_pwm_probe(struct platform_device *pdev)
priv->regmap = ddata->regmap; priv->regmap = ddata->regmap;
priv->clk = ddata->clk; priv->clk = ddata->clk;
priv->max_arr = ddata->max_arr; 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) if (!priv->regmap || !priv->clk)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment