All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pwm: bcm2835: Support for polarity setting via DT
@ 2017-07-08 10:13 Stefan Wahren
  2017-07-08 10:13 ` [PATCH 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells Stefan Wahren
       [not found] ` <1499508838-20715-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Wahren @ 2017-07-08 10:13 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Mark Rutland
  Cc: linux-rpi-kernel, Eric Anholt, linux-pwm, devicetree, Stefan Wahren

This patch series adds support for the third (optional) pwm cell to specify the
polarity.

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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells
  2017-07-08 10:13 [PATCH 0/2] pwm: bcm2835: Support for polarity setting via DT Stefan Wahren
@ 2017-07-08 10:13 ` Stefan Wahren
       [not found]   ` <1499508838-20715-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
       [not found] ` <1499508838-20715-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2017-07-08 10:13 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Mark Rutland
  Cc: linux-rpi-kernel, Eric Anholt, linux-pwm, devicetree, Stefan Wahren

We need to increase the pwm-cells for the optional flags parameter,
before we can implement support for polarity setting via DT.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
index cf573e8..8cf87d1 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
@@ -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@2020c000 {
 	compatible = "brcm,bcm2835-pwm";
 	reg = <0x2020c000 0x28>;
 	clocks = <&clk_pwm>;
-	#pwm-cells = <2>;
+	#pwm-cells = <3>;
 };
 
 clocks {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
       [not found] ` <1499508838-20715-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
@ 2017-07-08 10:13   ` Stefan Wahren
  2017-07-10 16:56     ` Eric Anholt
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2017-07-08 10:13 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Mark Rutland
  Cc: linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Eric Anholt,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Stefan Wahren

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-eS4NqCHxEME@public.gmane.org>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells
       [not found]   ` <1499508838-20715-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
@ 2017-07-10 16:00     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2017-07-10 16:00 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Thierry Reding, Mark Rutland,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Eric Anholt,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Sat, Jul 08, 2017 at 12:13:57PM +0200, Stefan Wahren wrote:
> We need to increase the pwm-cells for the optional flags parameter,
> before we can implement support for polarity setting via DT.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
  2017-07-08 10:13   ` [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT Stefan Wahren
@ 2017-07-10 16:56     ` Eric Anholt
       [not found]       ` <87pod8qli1.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Anholt @ 2017-07-10 16:56 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Mark Rutland
  Cc: linux-rpi-kernel, linux-pwm, devicetree, Stefan Wahren

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

Stefan Wahren <stefan.wahren@i2se.com> writes:

> 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>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
       [not found]       ` <87pod8qli1.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
@ 2017-07-20 17:34         ` Stefan Wahren
  2017-07-27  9:26           ` Stefan Wahren
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2017-07-20 17:34 UTC (permalink / raw)
  To: Eric Anholt, Rob Herring, Thierry Reding, Mark Rutland
  Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA


> Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org> hat am 10. Juli 2017 um 18:56 geschrieben:
> 
> 
> Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> writes:
> 
> > 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-eS4NqCHxEME@public.gmane.org>
> 
> Reviewed-by: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>

gentle ping to Thierry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
  2017-07-20 17:34         ` Stefan Wahren
@ 2017-07-27  9:26           ` Stefan Wahren
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Wahren @ 2017-07-27  9:26 UTC (permalink / raw)
  To: Eric Anholt, Rob Herring, Thierry Reding, Mark Rutland
  Cc: linux-pwm, linux-rpi-kernel, devicetree, Thierry Reding

Am 20.07.2017 um 19:34 schrieb Stefan Wahren:
>
>> Eric Anholt <eric@anholt.net> hat am 10. Juli 2017 um 18:56 geschrieben:
>>
>>
>> Stefan Wahren <stefan.wahren@i2se.com> writes:
>>
>>> 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>
> gentle ping to Thierry

ping ...

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-27  9:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-08 10:13 [PATCH 0/2] pwm: bcm2835: Support for polarity setting via DT Stefan Wahren
2017-07-08 10:13 ` [PATCH 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells Stefan Wahren
     [not found]   ` <1499508838-20715-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2017-07-10 16:00     ` Rob Herring
     [not found] ` <1499508838-20715-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2017-07-08 10:13   ` [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT Stefan Wahren
2017-07-10 16:56     ` Eric Anholt
     [not found]       ` <87pod8qli1.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2017-07-20 17:34         ` Stefan Wahren
2017-07-27  9:26           ` Stefan Wahren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.