linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pwm: bcm2835: Dynamically allocate base
@ 2020-02-03 21:35 Florian Fainelli
  2020-02-04  6:46 ` Uwe Kleine-König
  2020-02-04  9:17 ` Nicolas Saenz Julienne
  0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2020-02-03 21:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Thierry Reding, Uwe Kleine-König, Ray Jui,
	Scott Branden,
	maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Nicolas Saenz Julienne, Bart Tanghe, Stephen Warren,
	open list:PWM SUBSYSTEM,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE

The newer 2711 and 7211 chips have two PWM controllers and failure to
dynamically allocate the PWM base would prevent the second PWM
controller instance being probed for succeeding with an -EEXIST error
from alloc_pwms().

Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/pwm/pwm-bcm2835.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 91e24f01b54e..d78f86f8e462 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -166,6 +166,7 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
 
 	pc->chip.dev = &pdev->dev;
 	pc->chip.ops = &bcm2835_pwm_ops;
+	pc->chip.base = -1;
 	pc->chip.npwm = 2;
 	pc->chip.of_xlate = of_pwm_xlate_with_flags;
 	pc->chip.of_pwm_n_cells = 3;
-- 
2.17.1


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

* Re: [PATCH] pwm: bcm2835: Dynamically allocate base
  2020-02-03 21:35 [PATCH] pwm: bcm2835: Dynamically allocate base Florian Fainelli
@ 2020-02-04  6:46 ` Uwe Kleine-König
  2020-02-04  9:17 ` Nicolas Saenz Julienne
  1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2020-02-04  6:46 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, Thierry Reding, Ray Jui, Scott Branden,
	maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Nicolas Saenz Julienne, Bart Tanghe, Stephen Warren,
	open list:PWM SUBSYSTEM,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE

Hallo Florian,

On Mon, Feb 03, 2020 at 01:35:35PM -0800, Florian Fainelli wrote:
> The newer 2711 and 7211 chips have two PWM controllers and failure to
> dynamically allocate the PWM base would prevent the second PWM
> controller instance being probed for succeeding with an -EEXIST error
> from alloc_pwms().
> 
> Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

* Re: [PATCH] pwm: bcm2835: Dynamically allocate base
  2020-02-03 21:35 [PATCH] pwm: bcm2835: Dynamically allocate base Florian Fainelli
  2020-02-04  6:46 ` Uwe Kleine-König
@ 2020-02-04  9:17 ` Nicolas Saenz Julienne
  2020-02-20 19:14   ` Florian Fainelli
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Saenz Julienne @ 2020-02-04  9:17 UTC (permalink / raw)
  To: Florian Fainelli, linux-kernel
  Cc: moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list:PWM SUBSYSTEM, Bart Tanghe, Scott Branden,
	Stephen Warren, Ray Jui, Thierry Reding,
	maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	Uwe Kleine-König

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

On Mon, 2020-02-03 at 13:35 -0800, Florian Fainelli wrote:
> The newer 2711 and 7211 chips have two PWM controllers and failure to
> dynamically allocate the PWM base would prevent the second PWM
> controller instance being probed for succeeding with an -EEXIST error
> from alloc_pwms().
> 
> Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

>  drivers/pwm/pwm-bcm2835.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
> index 91e24f01b54e..d78f86f8e462 100644
> --- a/drivers/pwm/pwm-bcm2835.c
> +++ b/drivers/pwm/pwm-bcm2835.c
> @@ -166,6 +166,7 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
>  
>  	pc->chip.dev = &pdev->dev;
>  	pc->chip.ops = &bcm2835_pwm_ops;
> +	pc->chip.base = -1;
>  	pc->chip.npwm = 2;
>  	pc->chip.of_xlate = of_pwm_xlate_with_flags;
>  	pc->chip.of_pwm_n_cells = 3;


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] pwm: bcm2835: Dynamically allocate base
  2020-02-04  9:17 ` Nicolas Saenz Julienne
@ 2020-02-20 19:14   ` Florian Fainelli
  2020-02-20 21:07     ` Uwe Kleine-König
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2020-02-20 19:14 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Florian Fainelli, linux-kernel, Thierry Reding
  Cc: moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list:PWM SUBSYSTEM, Bart Tanghe, Scott Branden,
	Stephen Warren, Ray Jui,
	maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	Uwe Kleine-König

On 2/4/20 1:17 AM, Nicolas Saenz Julienne wrote:
> On Mon, 2020-02-03 at 13:35 -0800, Florian Fainelli wrote:
>> The newer 2711 and 7211 chips have two PWM controllers and failure to
>> dynamically allocate the PWM base would prevent the second PWM
>> controller instance being probed for succeeding with an -EEXIST error
>> from alloc_pwms().
>>
>> Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
> 
> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Thierry, is there any chance we can get this applied for an upcoming
5.6-rcX? Thank you!
-- 
Florian

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

* Re: [PATCH] pwm: bcm2835: Dynamically allocate base
  2020-02-20 19:14   ` Florian Fainelli
@ 2020-02-20 21:07     ` Uwe Kleine-König
  2020-03-13 17:37       ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2020-02-20 21:07 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Florian Fainelli, Nicolas Saenz Julienne, linux-kernel,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list:PWM SUBSYSTEM, Scott Branden, Stephen Warren, Ray Jui,
	maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE

[Dropping Bart Tanghe from recipents as the address bounces]

Hello Thierry,

On Thu, Feb 20, 2020 at 11:14:00AM -0800, Florian Fainelli wrote:
> On 2/4/20 1:17 AM, Nicolas Saenz Julienne wrote:
> > On Mon, 2020-02-03 at 13:35 -0800, Florian Fainelli wrote:
> >> The newer 2711 and 7211 chips have two PWM controllers and failure to
> >> dynamically allocate the PWM base would prevent the second PWM
> >> controller instance being probed for succeeding with an -EEXIST error
> >> from alloc_pwms().
> >>
> >> Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
> >> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> >> ---
> > 
> > Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Thierry, is there any chance we can get this applied for an upcoming
> 5.6-rcX? Thank you!

to assist you with patch sorting:

# revisions < v6 of "Convert period and duty cycle to u64"
pwclient -s Superseded 1237020 1237019 1229049 1229050 1222396

# most of "Add support for Azoteq IQS620A/621/622/624/625" v5 isn't for pwm
pwclient -s "Not Applicable" 1238908 1238907 1238906 1238904 1238903 1238901

# most of "Add support for Azoteq IQS620A/621/622/624/625" v4 isn't for pwm
pwclient -s "Not Applicable" 1224598 1224597 1224596 1224594 1224593 1224592
pwclient -s "Superseeded" 1224595

# "backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial
# state" already applied by Lee Jones
pwclient -s "Not Applicable" 1031586

# Problem resolved by Michal Vokáč
pwclient -s "Rejected"  1059267

(Not sure "Rejected" is the right state.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

* Re: [PATCH] pwm: bcm2835: Dynamically allocate base
  2020-02-20 21:07     ` Uwe Kleine-König
@ 2020-03-13 17:37       ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2020-03-13 17:37 UTC (permalink / raw)
  To: Uwe Kleine-König, Thierry Reding
  Cc: Florian Fainelli, Nicolas Saenz Julienne, linux-kernel,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list:PWM SUBSYSTEM, Scott Branden, Stephen Warren, Ray Jui,
	maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE



On 2/20/2020 1:07 PM, Uwe Kleine-König wrote:
> [Dropping Bart Tanghe from recipents as the address bounces]
> 
> Hello Thierry,
> 
> On Thu, Feb 20, 2020 at 11:14:00AM -0800, Florian Fainelli wrote:
>> On 2/4/20 1:17 AM, Nicolas Saenz Julienne wrote:
>>> On Mon, 2020-02-03 at 13:35 -0800, Florian Fainelli wrote:
>>>> The newer 2711 and 7211 chips have two PWM controllers and failure to
>>>> dynamically allocate the PWM base would prevent the second PWM
>>>> controller instance being probed for succeeding with an -EEXIST error
>>>> from alloc_pwms().
>>>>
>>>> Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
>>>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>>>> ---
>>>
>>> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>
>> Thierry, is there any chance we can get this applied for an upcoming
>> 5.6-rcX? Thank you!
> 
> to assist you with patch sorting:
> 
> # revisions < v6 of "Convert period and duty cycle to u64"
> pwclient -s Superseded 1237020 1237019 1229049 1229050 1222396
> 
> # most of "Add support for Azoteq IQS620A/621/622/624/625" v5 isn't for pwm
> pwclient -s "Not Applicable" 1238908 1238907 1238906 1238904 1238903 1238901
> 
> # most of "Add support for Azoteq IQS620A/621/622/624/625" v4 isn't for pwm
> pwclient -s "Not Applicable" 1224598 1224597 1224596 1224594 1224593 1224592
> pwclient -s "Superseeded" 1224595
> 
> # "backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial
> # state" already applied by Lee Jones
> pwclient -s "Not Applicable" 1031586
> 
> # Problem resolved by Michal Vokáč
> pwclient -s "Rejected"  1059267
> 
> (Not sure "Rejected" is the right state.)

Thierry, can we get this patch included in v5.7? I have not seen it show
up in linux-next yet.

Thank you!
-- 
Florian

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

end of thread, other threads:[~2020-03-13 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 21:35 [PATCH] pwm: bcm2835: Dynamically allocate base Florian Fainelli
2020-02-04  6:46 ` Uwe Kleine-König
2020-02-04  9:17 ` Nicolas Saenz Julienne
2020-02-20 19:14   ` Florian Fainelli
2020-02-20 21:07     ` Uwe Kleine-König
2020-03-13 17:37       ` Florian Fainelli

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