From: Gerald Baeza Date: Fri, 23 Feb 2018 13:36:04 +0000 (+0100) Subject: pwm: stm32: LPTimer: Use 3 cells ->of_xlate() X-Git-Tag: v5.15~9017^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6ea025f6ea1fb1455e59e2008d88f5c72f0d210;p=platform%2Fkernel%2Flinux-starfive.git 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: Gerald Baeza Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index cbd271e..7c13e25 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -202,6 +202,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev) priv->chip.dev = &pdev->dev; priv->chip.ops = &stm32_pwm_lp_ops; 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); if (ret < 0)