All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] i2c: mux: reg: don't log an error for probe deferral
@ 2017-12-18 16:18 Alexander Sverdlin
  2017-12-30 22:08 ` Peter Rosin
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Sverdlin @ 2017-12-18 16:18 UTC (permalink / raw)
  To: linux-i2c; +Cc: Tomasz Bachorski, Wolfram Sang, Peter Rosin, Alexander Sverdlin

From: Tomasz Bachorski <tomasz.bachorski@nokia.com>

It's possible that i2c_mux_reg_probe_dt() could return -EPROBE_DEFER.
In that case, driver will request a probe deferral and an error
suggesting device tree parsing problem will be reported. This is
a pretty confusing information. Let's change the error handling,
so driver will be able to request probe deferral without logging
not related errors.

Signed-off-by: Tomasz Bachorski <tomasz.bachorski@nokia.com>
---
 drivers/i2c/muxes/i2c-mux-reg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
index f6c9c3dc6cad..c948e5a4cb04 100644
--- a/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/drivers/i2c/muxes/i2c-mux-reg.c
@@ -177,6 +177,9 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
 			sizeof(mux->data));
 	} else {
 		ret = i2c_mux_reg_probe_dt(mux, pdev);
+		if (ret == -EPROBE_DEFER)
+			return ret;
+
 		if (ret < 0) {
 			dev_err(&pdev->dev, "Error parsing device tree");
 			return ret;
-- 
2.13.2

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

* Re: [PATCH v2] i2c: mux: reg: don't log an error for probe deferral
  2017-12-18 16:18 [PATCH v2] i2c: mux: reg: don't log an error for probe deferral Alexander Sverdlin
@ 2017-12-30 22:08 ` Peter Rosin
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Rosin @ 2017-12-30 22:08 UTC (permalink / raw)
  To: Alexander Sverdlin, linux-i2c; +Cc: Tomasz Bachorski, Wolfram Sang

On 2017-12-18 17:18, Alexander Sverdlin wrote:
> From: Tomasz Bachorski <tomasz.bachorski@nokia.com>
> 
> It's possible that i2c_mux_reg_probe_dt() could return -EPROBE_DEFER.
> In that case, driver will request a probe deferral and an error
> suggesting device tree parsing problem will be reported. This is
> a pretty confusing information. Let's change the error handling,
> so driver will be able to request probe deferral without logging
> not related errors.
> 
> Signed-off-by: Tomasz Bachorski <tomasz.bachorski@nokia.com>

Patch applied to i2c-mux/for-next, thanks!

Cheers,
Peter

> ---
>  drivers/i2c/muxes/i2c-mux-reg.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
> index f6c9c3dc6cad..c948e5a4cb04 100644
> --- a/drivers/i2c/muxes/i2c-mux-reg.c
> +++ b/drivers/i2c/muxes/i2c-mux-reg.c
> @@ -177,6 +177,9 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
>  			sizeof(mux->data));
>  	} else {
>  		ret = i2c_mux_reg_probe_dt(mux, pdev);
> +		if (ret == -EPROBE_DEFER)
> +			return ret;
> +
>  		if (ret < 0) {
>  			dev_err(&pdev->dev, "Error parsing device tree");
>  			return ret;
> 

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

end of thread, other threads:[~2017-12-30 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 16:18 [PATCH v2] i2c: mux: reg: don't log an error for probe deferral Alexander Sverdlin
2017-12-30 22:08 ` Peter Rosin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.