linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2 4/6] pwm_backlight: Add deferred probe support
Date: Wed, 19 Sep 2012 18:27:55 +0000	[thread overview]
Message-ID: <1697155.mRXUHrIIe9@avalon> (raw)
In-Reply-To: <1343140823-13754-5-git-send-email-laurent.pinchart@ideasonboard.com>

Hi Simon,

On Saturday 25 August 2012 15:57:12 Simon Horman wrote:
> On Tue, Jul 24, 2012 at 04:40:21PM +0200, Laurent Pinchart wrote:
> > If the PWM instance is not available yet at probe time, request a
> > deferred probe.
> > 
> > A better way to fix might be to create a PWM subsystem (possibly
> > integrated into the GPIO subsystem) to support generic PWM objects, and
> > make sure the subsystem gets initialized first.
> 
> Hi Richard,
> 
> I am wondering if you have had a chance to review this change.
> I believe that it is a pre-requisite for work that Laurent has
> done to enable the backlight on the Armadillo 800 EVA board.

The PWM core now returns -EPROBE_DEFER if pwm_get() or pwm_request() can't 
find the requested device, so this patch isn't needed anymore.

> If the change is ok I am happy to take it through
> my shmobile tree if that makes life easier for you.
> 
> Below is an updated version of the patch which applies on top of 3.6-rc3.
> 
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> pwm_backlight: Add deferred probe support
> 
> If the PWM instance is not available yet at probe time, request a
> deferred probe.
> 
> A better way to fix might be to create a PWM subsystem (possibly
> integrated into the GPIO subsystem) to support generic PWM objects, and
> make sure the subsystem gets initialized first.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> 
> diff --git a/drivers/video/backlight/pwm_bl.c
> b/drivers/video/backlight/pwm_bl.c index 995f016..cc71f87 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -221,6 +221,8 @@ static int pwm_backlight_probe(struct platform_device
> *pdev) if (IS_ERR(pb->pwm)) {
>  			dev_err(&pdev->dev, "unable to request legacy PWM\n");
>  			ret = PTR_ERR(pb->pwm);
> +			if (ret = -ENODEV)
> +				ret = -EPROBE_DEFER;
>  			goto err_alloc;
>  		}
>  	}
-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2012-09-19 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 14:40 [PATCH v2 4/6] pwm_backlight: Add deferred probe support Laurent Pinchart
2012-08-25  6:57 ` Simon Horman
2012-09-19 18:27 ` Laurent Pinchart [this message]
2012-09-20  1:52 ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1697155.mRXUHrIIe9@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).