backlight: pwm: handle EPROBE_DEFER while requesting the PWM
Subsystems (4)
PATCH 1/1 backlight: pwm: handle EPROBE_DEFER while requesting the PWM
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.
--- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/video/backlight/pwm_bl.c +4 -0
@@ -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" );
Signature · 1 line
2.1.3
Le 19/02/2015 10:30, Nicolas Ferre a ?crit :
Quoted 5 lines
When trying to request the PWM device with
devm_pwm_get(), theEPROBE_DEFERflag is not handled properly. It can lead to the PWM not being found.Signed-off-by Boris Brezillon <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>
Any comment on this patch?
Can we see it included during next cycle (4.1)?
(aka ping).
Bye,
Quoted 20 lines
--- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/video/backlight/pwm_bl.c +4
-0@@ -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" );
Signature · 1 line
Nicolas Ferre
Quoted 8 lines · Nicolas Ferre
When trying to request the PWM device with
devm_pwm_get(), theEPROBE_DEFERflag is not handled properly. It can lead to the PWM not being found.Signed-off-by Boris Brezillon <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>--- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+)
I need a Thierry Ack for this.
Quoted 15 lines
drivers/video/backlight/pwm_bl.c +4
-0@@ -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" );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 8 lines · Nicolas Ferre
When trying to request the PWM device with
devm_pwm_get(), theEPROBE_DEFERflag is not handled properly. It can lead to the PWM not being found.Signed-off-by Boris Brezillon <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>--- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150312/483429d4/attachment-0001.sig>
Lee Jones
AppliedQuoted 8 lines · Nicolas Ferre
When trying to request the PWM device with
devm_pwm_get(), theEPROBE_DEFERflag is not handled properly. It can lead to the PWM not being found.Signed-off-by Boris Brezillon <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>--- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+)
Applied, thanks.
Quoted 15 lines
drivers/video/backlight/pwm_bl.c +4
-0@@ -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" );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Hi Lee,
Quoted 5 lines · On Thu, 12 Mar 2015 09:02:24 +0000 Lee Jones <[email protected]> wrote:
Quoted 3 lines · Nicolas Ferre
When trying to request the PWM device with
devm_pwm_get(), theEPROBE_DEFERflag is not handled properly. It can lead to the PWM not being found.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Boris Brezillon <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>--- 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
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 backlight: pwm: handle EPROBE_DEFER while requesting the PWM
Stephen, Boris,
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
When trying to request the PWM device with
devm_pwm_get(), theEPROBE_DEFERflag is not handled properly. It can lead to the PWM not being found.Signed-off-by Boris Brezillon <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>--- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+)
Quoted 6 lines
Quoted 1 line
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
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Hi Lee,
Quoted 6 lines · On Tue, 26 May 2015 08:36:48 +0100 Lee Jones <[email protected]> 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.
Signature · 10 lines
Cheers, Stephen Rothwell sfr at canb.auug.org.au -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150527/1ea6990c/attachment-0001.sig>