提交 f6ea025f 编写于 作者: G Gerald Baeza 提交者: Thierry Reding

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

STM32 Low-Power Timer supports generic 3 cells PWM to encode PWM number,
period and polarity.
Signed-off-by: NGerald Baeza <gerald.baeza@st.com>
Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 e7c4b02c
...@@ -202,6 +202,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev) ...@@ -202,6 +202,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev)
priv->chip.dev = &pdev->dev; priv->chip.dev = &pdev->dev;
priv->chip.ops = &stm32_pwm_lp_ops; priv->chip.ops = &stm32_pwm_lp_ops;
priv->chip.npwm = 1; priv->chip.npwm = 1;
priv->chip.of_xlate = of_pwm_xlate_with_flags;
priv->chip.of_pwm_n_cells = 3;
ret = pwmchip_add(&priv->chip); ret = pwmchip_add(&priv->chip);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册