1
0
Fork 0

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

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

Fixes: 7edf736920 ("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>
alistair/sunxi64-5.4-dsi
Fabrice Gasnier 2019-06-19 11:52:02 +02:00 committed by Thierry Reding
parent 69252ec165
commit 0b055ed4c9
1 changed files with 2 additions and 0 deletions

View File

@ -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;