提交 0b055ed4 编写于 作者: F Fabrice Gasnier 提交者: 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: NFabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: NBenjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 69252ec1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册