linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
@ 2015-02-19  9:30 Nicolas Ferre
  2015-03-11 12:48 ` Nicolas Ferre
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nicolas Ferre @ 2015-02-19  9:30 UTC (permalink / raw)
  To: linux-arm-kernel, linux-pwm, thierry.reding, lee.jones, jg1.han
  Cc: linux-kernel, Boris BREZILLON, Alexandre Belloni, Nicolas Ferre

When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
flag is not handled properly. It can lead to the PWM not being found.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/video/backlight/pwm_bl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 3a145a643e0d..6897f1c1bc73 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -274,6 +274,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 
 	pb->pwm = devm_pwm_get(&pdev->dev, NULL);
 	if (IS_ERR(pb->pwm)) {
+		ret = PTR_ERR(pb->pwm);
+		if (ret == -EPROBE_DEFER)
+			goto err_alloc;
+
 		dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
 		pb->legacy = true;
 		pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
-- 
2.1.3


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

* Re: [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-02-19  9:30 [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM Nicolas Ferre
@ 2015-03-11 12:48 ` Nicolas Ferre
  2015-03-12  6:59 ` Lee Jones
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2015-03-11 12:48 UTC (permalink / raw)
  To: thierry.reding, jg1.han
  Cc: linux-arm-kernel, linux-pwm, lee.jones, linux-kernel,
	Boris BREZILLON, Alexandre Belloni

Le 19/02/2015 10:30, Nicolas Ferre a écrit :
> When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> flag is not handled properly. It can lead to the PWM not being found.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Any comment on this patch?
Can we see it included during next cycle (4.1)?

(aka ping).

Bye,


> ---
>  drivers/video/backlight/pwm_bl.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 3a145a643e0d..6897f1c1bc73 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -274,6 +274,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
>  
>  	pb->pwm = devm_pwm_get(&pdev->dev, NULL);
>  	if (IS_ERR(pb->pwm)) {
> +		ret = PTR_ERR(pb->pwm);
> +		if (ret == -EPROBE_DEFER)
> +			goto err_alloc;
> +
>  		dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
>  		pb->legacy = true;
>  		pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
> 


-- 
Nicolas Ferre

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

* Re: [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-02-19  9:30 [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM Nicolas Ferre
  2015-03-11 12:48 ` Nicolas Ferre
@ 2015-03-12  6:59 ` Lee Jones
  2015-03-12  7:49 ` Thierry Reding
  2015-03-12  9:02 ` Lee Jones
  3 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2015-03-12  6:59 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-arm-kernel, linux-pwm, thierry.reding, jg1.han,
	linux-kernel, Boris BREZILLON, Alexandre Belloni

On Thu, 19 Feb 2015, Nicolas Ferre wrote:

> When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> flag is not handled properly. It can lead to the PWM not being found.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  drivers/video/backlight/pwm_bl.c | 4 ++++
>  1 file changed, 4 insertions(+)

I need a Thierry Ack for this.

> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 3a145a643e0d..6897f1c1bc73 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -274,6 +274,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
>  
>  	pb->pwm = devm_pwm_get(&pdev->dev, NULL);
>  	if (IS_ERR(pb->pwm)) {
> +		ret = PTR_ERR(pb->pwm);
> +		if (ret == -EPROBE_DEFER)
> +			goto err_alloc;
> +
>  		dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
>  		pb->legacy = true;
>  		pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-02-19  9:30 [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM Nicolas Ferre
  2015-03-11 12:48 ` Nicolas Ferre
  2015-03-12  6:59 ` Lee Jones
@ 2015-03-12  7:49 ` Thierry Reding
  2015-03-12  9:02 ` Lee Jones
  3 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2015-03-12  7:49 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-arm-kernel, linux-pwm, lee.jones, jg1.han, linux-kernel,
	Boris BREZILLON, Alexandre Belloni

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

On Thu, Feb 19, 2015 at 10:30:14AM +0100, Nicolas Ferre wrote:
> When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> flag is not handled properly. It can lead to the PWM not being found.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  drivers/video/backlight/pwm_bl.c | 4 ++++
>  1 file changed, 4 insertions(+)

Acked-by: Thierry Reding <thierry.reding@gmail.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-02-19  9:30 [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM Nicolas Ferre
                   ` (2 preceding siblings ...)
  2015-03-12  7:49 ` Thierry Reding
@ 2015-03-12  9:02 ` Lee Jones
  2015-05-25  9:27   ` Boris Brezillon
  3 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2015-03-12  9:02 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-arm-kernel, linux-pwm, thierry.reding, jg1.han,
	linux-kernel, Boris BREZILLON, Alexandre Belloni

On Thu, 19 Feb 2015, Nicolas Ferre wrote:

> When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> flag is not handled properly. It can lead to the PWM not being found.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  drivers/video/backlight/pwm_bl.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks.

> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 3a145a643e0d..6897f1c1bc73 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -274,6 +274,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
>  
>  	pb->pwm = devm_pwm_get(&pdev->dev, NULL);
>  	if (IS_ERR(pb->pwm)) {
> +		ret = PTR_ERR(pb->pwm);
> +		if (ret == -EPROBE_DEFER)
> +			goto err_alloc;
> +
>  		dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
>  		pb->legacy = true;
>  		pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-03-12  9:02 ` Lee Jones
@ 2015-05-25  9:27   ` Boris Brezillon
  2015-05-26  7:36     ` [NEXT REQUEST][PATCH] " Lee Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Brezillon @ 2015-05-25  9:27 UTC (permalink / raw)
  To: Lee Jones
  Cc: Nicolas Ferre, linux-arm-kernel, linux-pwm, thierry.reding,
	jg1.han, linux-kernel, Alexandre Belloni

Hi Lee,

On Thu, 12 Mar 2015 09:02:24 +0000
Lee Jones <lee.jones@linaro.org> wrote:

> On Thu, 19 Feb 2015, Nicolas Ferre wrote:
> 
> > When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> > flag is not handled properly. It can lead to the PWM not being found.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> > ---
> >  drivers/video/backlight/pwm_bl.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> Applied, thanks.

I don't see this patch in Linus' tree (actually, it's not even in
linux-next).
I don't know where it's stuck, but could you make sure it reaches
mainline for 4.2 (or 4.1 if it's not to late) ?

Best Regards,

Boris




-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [NEXT REQUEST][PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-05-25  9:27   ` Boris Brezillon
@ 2015-05-26  7:36     ` Lee Jones
  2015-05-26 21:20       ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2015-05-26  7:36 UTC (permalink / raw)
  To: Boris Brezillon, sfr, linux-next
  Cc: Nicolas Ferre, linux-arm-kernel, linux-pwm, thierry.reding,
	jg1.han, linux-kernel, Alexandre Belloni

Stephen, Boris,

> > > When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> > > flag is not handled properly. It can lead to the PWM not being found.
> > > 
> > > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> > > ---
> > >  drivers/video/backlight/pwm_bl.c | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > 
> > Applied, thanks.
> 
> I don't see this patch in Linus' tree (actually, it's not even in
> linux-next).
> I don't know where it's stuck, but could you make sure it reaches
> mainline for 4.2 (or 4.1 if it's not to late) ?

Sorry for the confusion.

It looks like my for-backlight-fixes branch isn't in -next.

Stephen, could you rectify that please?

M: git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [NEXT REQUEST][PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM
  2015-05-26  7:36     ` [NEXT REQUEST][PATCH] " Lee Jones
@ 2015-05-26 21:20       ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2015-05-26 21:20 UTC (permalink / raw)
  To: Lee Jones
  Cc: Boris Brezillon, linux-next, Nicolas Ferre, linux-arm-kernel,
	linux-pwm, thierry.reding, jg1.han, linux-kernel,
	Alexandre Belloni

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

Hi Lee,

On Tue, 26 May 2015 08:36:48 +0100 Lee Jones <lee.jones@linaro.org> wrote:
>
> It looks like my for-backlight-fixes branch isn't in -next.
> 
> Stephen, could you rectify that please?
> 
> M: git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git

Added from today.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
        Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-05-26 21:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19  9:30 [PATCH] backlight: pwm: handle EPROBE_DEFER while requesting the PWM Nicolas Ferre
2015-03-11 12:48 ` Nicolas Ferre
2015-03-12  6:59 ` Lee Jones
2015-03-12  7:49 ` Thierry Reding
2015-03-12  9:02 ` Lee Jones
2015-05-25  9:27   ` Boris Brezillon
2015-05-26  7:36     ` [NEXT REQUEST][PATCH] " Lee Jones
2015-05-26 21:20       ` Stephen Rothwell

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