From: Stefan Wahren Date: Sat, 12 Aug 2017 10:19:44 +0000 (+0200) Subject: pwm: bcm2835: Support for polarity setting via DT X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a88b2a2017d1e7e80db53080baff591fd454722;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git pwm: bcm2835: Support for polarity setting via DT This adds support for the third (optional) pwm cell to specify the polarity, which is needed by display backlights for example. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index c5dbf16d810b..db001cba937f 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -167,6 +167,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) pc->chip.dev = &pdev->dev; pc->chip.ops = &bcm2835_pwm_ops; pc->chip.npwm = 2; + pc->chip.of_xlate = of_pwm_xlate_with_flags; + pc->chip.of_pwm_n_cells = 3; platform_set_drvdata(pdev, pc);