pwm: bcm2835: Support for polarity setting via DT
Subsystems (4)
v2 cover pwm: bcm2835: Support for polarity setting via DT
This patch series adds support for the third (optional) pwm cell to specify the polarity.
Changes in V2:
* add ack and review tags
Stefan Wahren (2):
dt-bindings: pwm-bcm2835: Increase pwm-cells
pwm: bcm2835: Support for polarity setting via DT
Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++-- drivers/pwm/pwm-bcm2835.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/2 dt-bindings: pwm-bcm2835: Increase pwm-cells
We need to increase the pwm-cells for the optional flags parameter, before we can implement support for polarity setting via DT.
--- Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt +2 -2
@@ -6,7 +6,7 @@ Required properties: - clocks: This clock defines the base clock frequency of the PWM hardware system, the period and the duty_cycle of the PWM signal is a multiple of the base period. -- #pwm-cells: Should be 2. See pwm.txt in this directory for a description of +- #pwm-cells: Should be 3. See pwm.txt in this directory for a description of the cells format. Examples:
@@ -15,7 +15,7 @@ pwm at 2020c000 { compatible = "brcm,bcm2835-pwm"; reg = <0x2020c000 0x28>; clocks = <&clk_pwm>; - #pwm-cells = <2>; + #pwm-cells = <3>; }; clocks {
Signature · 1 line
2.7.4
PATCH v2 2/2 pwm: bcm2835: Support for polarity setting via DT
In reply to Stefan WahrenThis adds support for the third (optional) pwm cell to specify the polarity, which is needed by display backlights for example.
--- drivers/pwm/pwm-bcm2835.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pwm/pwm-bcm2835.c +2 -0
@@ -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);
Signature · 1 line
2.7.4
v2 cover pwm: bcm2835: Support for polarity setting via DT
In reply to Stefan WahrenQuoted 6 lines · Stefan Wahren
This patch series adds support for the third (optional) pwm cell to specify the polarity.
Changes in V2:
* add ack and review tags
Quoted 7 lines
Stefan Wahren (2):
dt-bindings: pwm-bcm2835: Increase pwm-cells
pwm: bcm2835: Support for polarity setting via DTDocumentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++-- drivers/pwm/pwm-bcm2835.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Both patches applied to for-4.14/drivers, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170821/d3f57336/attachment.sig>