forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
69252ec165
commit
0b055ed4c9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user