All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
@ 2020-08-07  9:14 Shengjiu Wang
  2020-08-10  8:00   ` Nicolin Chen
  2020-08-10 23:11   ` Nicolin Chen
  0 siblings, 2 replies; 9+ messages in thread
From: Shengjiu Wang @ 2020-08-07  9:14 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
	perex, tiwai, alsa-devel, linuxppc-dev, linux-kernel

Regmap initialization may return -EPROBE_DEFER for clock
may not be ready, so check -EPROBE_DEFER error type before
start another Regmap initialization.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/fsl/fsl_sai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index a22562f2df47..eb933fe9b6d1 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
 			"bus", base, &fsl_sai_regmap_config);
 
 	/* Compatible with old DTB cases */
-	if (IS_ERR(sai->regmap))
+	if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
 		sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
 				"sai", base, &fsl_sai_regmap_config);
 	if (IS_ERR(sai->regmap)) {
-- 
2.27.0


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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
  2020-08-07  9:14 [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init Shengjiu Wang
  2020-08-10  8:00   ` Nicolin Chen
@ 2020-08-10  8:00   ` Nicolin Chen
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2020-08-10  8:00 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: timur, Xiubo.Lee, festevam, lgirdwood, broonie, perex, tiwai,
	alsa-devel, linuxppc-dev, linux-kernel

On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> Regmap initialization may return -EPROBE_DEFER for clock
> may not be ready, so check -EPROBE_DEFER error type before
> start another Regmap initialization.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  sound/soc/fsl/fsl_sai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index a22562f2df47..eb933fe9b6d1 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
>  			"bus", base, &fsl_sai_regmap_config);
>  
>  	/* Compatible with old DTB cases */
> -	if (IS_ERR(sai->regmap))
> +	if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
>  		sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
>  				"sai", base, &fsl_sai_regmap_config);
>  	if (IS_ERR(sai->regmap)) {

In that case, might need a !EPROBE_DEFER check for this
fallback devm_regmap_init_mmio_clk at "sai" clock too?

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
@ 2020-08-10  8:00   ` Nicolin Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2020-08-10  8:00 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: alsa-devel, timur, Xiubo.Lee, linuxppc-dev, tiwai, lgirdwood,
	broonie, festevam, linux-kernel

On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> Regmap initialization may return -EPROBE_DEFER for clock
> may not be ready, so check -EPROBE_DEFER error type before
> start another Regmap initialization.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  sound/soc/fsl/fsl_sai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index a22562f2df47..eb933fe9b6d1 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
>  			"bus", base, &fsl_sai_regmap_config);
>  
>  	/* Compatible with old DTB cases */
> -	if (IS_ERR(sai->regmap))
> +	if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
>  		sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
>  				"sai", base, &fsl_sai_regmap_config);
>  	if (IS_ERR(sai->regmap)) {

In that case, might need a !EPROBE_DEFER check for this
fallback devm_regmap_init_mmio_clk at "sai" clock too?

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
@ 2020-08-10  8:00   ` Nicolin Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2020-08-10  8:00 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: alsa-devel, timur, Xiubo.Lee, linuxppc-dev, tiwai, lgirdwood,
	perex, broonie, festevam, linux-kernel

On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> Regmap initialization may return -EPROBE_DEFER for clock
> may not be ready, so check -EPROBE_DEFER error type before
> start another Regmap initialization.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  sound/soc/fsl/fsl_sai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index a22562f2df47..eb933fe9b6d1 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
>  			"bus", base, &fsl_sai_regmap_config);
>  
>  	/* Compatible with old DTB cases */
> -	if (IS_ERR(sai->regmap))
> +	if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
>  		sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
>  				"sai", base, &fsl_sai_regmap_config);
>  	if (IS_ERR(sai->regmap)) {

In that case, might need a !EPROBE_DEFER check for this
fallback devm_regmap_init_mmio_clk at "sai" clock too?

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
  2020-08-10  8:00   ` Nicolin Chen
@ 2020-08-10  8:53     ` Shengjiu Wang
  -1 siblings, 0 replies; 9+ messages in thread
From: Shengjiu Wang @ 2020-08-10  8:53 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: Shengjiu Wang, Linux-ALSA, Timur Tabi, Xiubo Li, linuxppc-dev,
	Takashi Iwai, Liam Girdwood, Mark Brown, Fabio Estevam,
	linux-kernel

On Mon, Aug 10, 2020 at 4:02 PM Nicolin Chen <nicoleotsuka@gmail.com> wrote:
>
> On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> > Regmap initialization may return -EPROBE_DEFER for clock
> > may not be ready, so check -EPROBE_DEFER error type before
> > start another Regmap initialization.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >  sound/soc/fsl/fsl_sai.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index a22562f2df47..eb933fe9b6d1 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
> >                       "bus", base, &fsl_sai_regmap_config);
> >
> >       /* Compatible with old DTB cases */
> > -     if (IS_ERR(sai->regmap))
> > +     if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
> >               sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
> >                               "sai", base, &fsl_sai_regmap_config);
> >       if (IS_ERR(sai->regmap)) {
>
> In that case, might need a !EPROBE_DEFER check for this
> fallback devm_regmap_init_mmio_clk at "sai" clock too?

No, I think it is ok for this fallback to return directly with
EPROBE_DEFER.

best regards
wang shengjiu

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
@ 2020-08-10  8:53     ` Shengjiu Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Shengjiu Wang @ 2020-08-10  8:53 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Fabio Estevam, Shengjiu Wang,
	Takashi Iwai, Liam Girdwood, Mark Brown, linuxppc-dev,
	linux-kernel

On Mon, Aug 10, 2020 at 4:02 PM Nicolin Chen <nicoleotsuka@gmail.com> wrote:
>
> On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> > Regmap initialization may return -EPROBE_DEFER for clock
> > may not be ready, so check -EPROBE_DEFER error type before
> > start another Regmap initialization.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >  sound/soc/fsl/fsl_sai.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index a22562f2df47..eb933fe9b6d1 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
> >                       "bus", base, &fsl_sai_regmap_config);
> >
> >       /* Compatible with old DTB cases */
> > -     if (IS_ERR(sai->regmap))
> > +     if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
> >               sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
> >                               "sai", base, &fsl_sai_regmap_config);
> >       if (IS_ERR(sai->regmap)) {
>
> In that case, might need a !EPROBE_DEFER check for this
> fallback devm_regmap_init_mmio_clk at "sai" clock too?

No, I think it is ok for this fallback to return directly with
EPROBE_DEFER.

best regards
wang shengjiu

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
  2020-08-07  9:14 [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init Shengjiu Wang
  2020-08-10  8:00   ` Nicolin Chen
@ 2020-08-10 23:11   ` Nicolin Chen
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2020-08-10 23:11 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: timur, Xiubo.Lee, festevam, lgirdwood, broonie, perex, tiwai,
	alsa-devel, linuxppc-dev, linux-kernel

On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> Regmap initialization may return -EPROBE_DEFER for clock
> may not be ready, so check -EPROBE_DEFER error type before
> start another Regmap initialization.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
@ 2020-08-10 23:11   ` Nicolin Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2020-08-10 23:11 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: alsa-devel, timur, Xiubo.Lee, linuxppc-dev, tiwai, lgirdwood,
	broonie, festevam, linux-kernel

On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> Regmap initialization may return -EPROBE_DEFER for clock
> may not be ready, so check -EPROBE_DEFER error type before
> start another Regmap initialization.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

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

* Re: [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init
@ 2020-08-10 23:11   ` Nicolin Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2020-08-10 23:11 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: alsa-devel, timur, Xiubo.Lee, linuxppc-dev, tiwai, lgirdwood,
	perex, broonie, festevam, linux-kernel

On Fri, Aug 07, 2020 at 05:14:42PM +0800, Shengjiu Wang wrote:
> Regmap initialization may return -EPROBE_DEFER for clock
> may not be ready, so check -EPROBE_DEFER error type before
> start another Regmap initialization.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

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

end of thread, other threads:[~2020-08-10 23:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07  9:14 [PATCH] ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init Shengjiu Wang
2020-08-10  8:00 ` Nicolin Chen
2020-08-10  8:00   ` Nicolin Chen
2020-08-10  8:00   ` Nicolin Chen
2020-08-10  8:53   ` Shengjiu Wang
2020-08-10  8:53     ` Shengjiu Wang
2020-08-10 23:11 ` Nicolin Chen
2020-08-10 23:11   ` Nicolin Chen
2020-08-10 23:11   ` Nicolin Chen

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.