From: Stefan Wahren <stefan.wahren@i2se.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org,
Stefan Wahren <stefan.wahren@i2se.com>
Subject: [PATCH V2 2/2] pwm: bcm2835: Support for polarity setting via DT
Date: Sat, 12 Aug 2017 12:19:44 +0200 [thread overview]
Message-ID: <1502533184-15765-3-git-send-email-stefan.wahren@i2se.com> (raw)
In-Reply-To: <1502533184-15765-1-git-send-email-stefan.wahren@i2se.com>
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>
---
drivers/pwm/pwm-bcm2835.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index c5dbf16..db001cb 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);
--
2.7.4
next prev parent reply other threads:[~2017-08-12 10:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-12 10:19 [PATCH V2 0/2] pwm: bcm2835: Support for polarity setting via DT Stefan Wahren
2017-08-12 10:19 ` [PATCH V2 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells Stefan Wahren
2017-08-12 10:19 ` Stefan Wahren [this message]
2017-08-21 5:28 ` [PATCH V2 0/2] pwm: bcm2835: Support for polarity setting via DT Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1502533184-15765-3-git-send-email-stefan.wahren@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).