diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2017-08-12 06:19:44 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2017-08-21 01:27:58 -0400 |
commit | 8a88b2a2017d1e7e80db53080baff591fd454722 (patch) | |
tree | 9d55587aafc8237aa1fd7f26b389f1d34e6cdda6 /drivers/pwm/pwm-bcm2835.c | |
parent | 46421d9d8e802e570dfa4d793a4938d2642ec7a7 (diff) |
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 <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-bcm2835.c')
-rw-r--r-- | drivers/pwm/pwm-bcm2835.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
167 | pc->chip.dev = &pdev->dev; | 167 | pc->chip.dev = &pdev->dev; |
168 | pc->chip.ops = &bcm2835_pwm_ops; | 168 | pc->chip.ops = &bcm2835_pwm_ops; |
169 | pc->chip.npwm = 2; | 169 | pc->chip.npwm = 2; |
170 | pc->chip.of_xlate = of_pwm_xlate_with_flags; | ||
171 | pc->chip.of_pwm_n_cells = 3; | ||
170 | 172 | ||
171 | platform_set_drvdata(pdev, pc); | 173 | platform_set_drvdata(pdev, pc); |
172 | 174 | ||