devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: allow drivers to request probe deferral
@ 2013-07-18 11:57 Philipp Zabel
       [not found] ` <1374148653-14009-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  2013-07-18 17:06 ` Stephen Warren
  0 siblings, 2 replies; 3+ messages in thread
From: Philipp Zabel @ 2013-07-18 11:57 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Marek Vasut, Fabio Estevam, Mike Turquette, Philipp Zabel,
	Len Brown, Sascha Hauer, Rafael J. Wysocki, Pavel Machek,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Roger Quadros

If the requested reset controller is not yet available, have reset_control_get
and device_reset return -EPROBE_DEFER so the driver can decide to request
probe deferral.

Signed-off-by: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
 drivers/reset/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index d1b6089..b3d99a1 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -167,7 +167,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
 
 	if (!rcdev) {
 		mutex_unlock(&reset_controller_list_mutex);
-		return ERR_PTR(-ENODEV);
+		return ERR_PTR(-EPROBE_DEFER);
 	}
 
 	rstc_id = rcdev->of_xlate(rcdev, &args);
-- 
1.8.3.2

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

* Re: [PATCH] reset: allow drivers to request probe deferral
       [not found] ` <1374148653-14009-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2013-07-18 12:04   ` Shawn Guo
  0 siblings, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2013-07-18 12:04 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Marek Vasut, Fabio Estevam, Mike Turquette, Len Brown,
	Sascha Hauer, Rafael J. Wysocki, Pavel Machek,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Roger Quadros

On Thu, Jul 18, 2013 at 01:57:33PM +0200, Philipp Zabel wrote:
> If the requested reset controller is not yet available, have reset_control_get
> and device_reset return -EPROBE_DEFER so the driver can decide to request
> probe deferral.
> 
> Signed-off-by: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
>  drivers/reset/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> index d1b6089..b3d99a1 100644
> --- a/drivers/reset/core.c
> +++ b/drivers/reset/core.c
> @@ -167,7 +167,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
>  
>  	if (!rcdev) {
>  		mutex_unlock(&reset_controller_list_mutex);
> -		return ERR_PTR(-ENODEV);
> +		return ERR_PTR(-EPROBE_DEFER);

Yeah, with the change the client device driver does not need to
translate error code -ENODEV into -EPROBE_DEFER, but just return
whatever device_reset() returns in error case.  So,

Acked-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

>  	}
>  
>  	rstc_id = rcdev->of_xlate(rcdev, &args);
> -- 
> 1.8.3.2
> 

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

* Re: [PATCH] reset: allow drivers to request probe deferral
  2013-07-18 11:57 [PATCH] reset: allow drivers to request probe deferral Philipp Zabel
       [not found] ` <1374148653-14009-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2013-07-18 17:06 ` Stephen Warren
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-07-18 17:06 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Marek Vasut, Fabio Estevam, Mike Turquette, Arnd Bergmann,
	Len Brown, Sascha Hauer, Rafael J. Wysocki, Pavel Machek,
	Olof Johansson, Shawn Guo, devicetree-discuss, linux-arm-kernel,
	Roger Quadros

On 07/18/2013 05:57 AM, Philipp Zabel wrote:
> If the requested reset controller is not yet available, have reset_control_get
> and device_reset return -EPROBE_DEFER so the driver can decide to request
> probe deferral.

Reviewed-by: Stephen Warren <swarren@nvidia.com>

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

end of thread, other threads:[~2013-07-18 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 11:57 [PATCH] reset: allow drivers to request probe deferral Philipp Zabel
     [not found] ` <1374148653-14009-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-07-18 12:04   ` Shawn Guo
2013-07-18 17:06 ` Stephen Warren

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