Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;