Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails
@ 2016-03-28 11:31 Fabio Estevam
  2016-03-28 11:31 ` [PATCH 2/2] ASoC: wm8962: Fit error message into a single line Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fabio Estevam @ 2016-03-28 11:31 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, ckeepax, alsa-devel

From: Fabio Estevam <fabio.estevam@nxp.com>

When regulator_bulk_enable() fails inside wm8962_runtime_resume(),
we should disable the previously enabled clock.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/codecs/wm8962.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8822360..f3f71ba 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3800,7 +3800,7 @@ static int wm8962_runtime_resume(struct device *dev)
 	if (ret != 0) {
 		dev_err(dev,
 			"Failed to enable supplies: %d\n", ret);
-		return ret;
+		goto disable_clock;
 	}
 
 	regcache_cache_only(wm8962->regmap, false);
@@ -3838,6 +3838,10 @@ static int wm8962_runtime_resume(struct device *dev)
 	msleep(5);
 
 	return 0;
+
+disable_clock:
+	clk_disable_unprepare(wm8962->pdata.mclk);
+	return ret;
 }
 
 static int wm8962_runtime_suspend(struct device *dev)
-- 
1.9.1

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

* [PATCH 2/2] ASoC: wm8962: Fit error message into a single line
  2016-03-28 11:31 [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Fabio Estevam
@ 2016-03-28 11:31 ` Fabio Estevam
  2016-03-28 12:57   ` Charles Keepax
  2016-03-29 17:08   ` Applied "ASoC: wm8962: Fit error message into a single line" to the asoc tree Mark Brown
  2016-03-28 12:56 ` [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Charles Keepax
  2016-03-29 17:08 ` Applied "ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails" to the asoc tree Mark Brown
  2 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2016-03-28 11:31 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, ckeepax, alsa-devel

From: Fabio Estevam <fabio.estevam@nxp.com>

The error message fits well into a single line.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/codecs/wm8962.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index f3f71ba..93f75dc 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3798,8 +3798,7 @@ static int wm8962_runtime_resume(struct device *dev)
 	ret = regulator_bulk_enable(ARRAY_SIZE(wm8962->supplies),
 				    wm8962->supplies);
 	if (ret != 0) {
-		dev_err(dev,
-			"Failed to enable supplies: %d\n", ret);
+		dev_err(dev, "Failed to enable supplies: %d\n", ret);
 		goto disable_clock;
 	}
 
-- 
1.9.1

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

* Re: [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails
  2016-03-28 11:31 [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Fabio Estevam
  2016-03-28 11:31 ` [PATCH 2/2] ASoC: wm8962: Fit error message into a single line Fabio Estevam
@ 2016-03-28 12:56 ` Charles Keepax
  2016-03-29 17:08 ` Applied "ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails" to the asoc tree Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2016-03-28 12:56 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie

On Mon, Mar 28, 2016 at 08:31:18AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> When regulator_bulk_enable() fails inside wm8962_runtime_resume(),
> we should disable the previously enabled clock.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

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

* Re: [PATCH 2/2] ASoC: wm8962: Fit error message into a single line
  2016-03-28 11:31 ` [PATCH 2/2] ASoC: wm8962: Fit error message into a single line Fabio Estevam
@ 2016-03-28 12:57   ` Charles Keepax
  2016-03-29 17:08   ` Applied "ASoC: wm8962: Fit error message into a single line" to the asoc tree Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2016-03-28 12:57 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie

On Mon, Mar 28, 2016 at 08:31:19AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> The error message fits well into a single line.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

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

* Applied "ASoC: wm8962: Fit error message into a single line" to the asoc tree
  2016-03-28 11:31 ` [PATCH 2/2] ASoC: wm8962: Fit error message into a single line Fabio Estevam
  2016-03-28 12:57   ` Charles Keepax
@ 2016-03-29 17:08   ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2016-03-29 17:08 UTC (permalink / raw)
  To: Fabio Estevam, Charles Keepax, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: wm8962: Fit error message into a single line

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 8bfa934e10d99b524bfe80b793e235b9188a7b58 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Mon, 28 Mar 2016 08:31:19 -0300
Subject: [PATCH] ASoC: wm8962: Fit error message into a single line

The error message fits well into a single line.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm8962.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index f3f71ba0ed12..93f75dcee388 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3798,8 +3798,7 @@ static int wm8962_runtime_resume(struct device *dev)
 	ret = regulator_bulk_enable(ARRAY_SIZE(wm8962->supplies),
 				    wm8962->supplies);
 	if (ret != 0) {
-		dev_err(dev,
-			"Failed to enable supplies: %d\n", ret);
+		dev_err(dev, "Failed to enable supplies: %d\n", ret);
 		goto disable_clock;
 	}
 
-- 
2.8.0.rc3

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

* Applied "ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails" to the asoc tree
  2016-03-28 11:31 [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Fabio Estevam
  2016-03-28 11:31 ` [PATCH 2/2] ASoC: wm8962: Fit error message into a single line Fabio Estevam
  2016-03-28 12:56 ` [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Charles Keepax
@ 2016-03-29 17:08 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2016-03-29 17:08 UTC (permalink / raw)
  To: Fabio Estevam, Charles Keepax, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 65147846796bd443972d9055b3b4c1339e15d53a Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Mon, 28 Mar 2016 08:31:18 -0300
Subject: [PATCH] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails

When regulator_bulk_enable() fails inside wm8962_runtime_resume(),
we should disable the previously enabled clock.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm8962.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 88223608a33f..f3f71ba0ed12 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3800,7 +3800,7 @@ static int wm8962_runtime_resume(struct device *dev)
 	if (ret != 0) {
 		dev_err(dev,
 			"Failed to enable supplies: %d\n", ret);
-		return ret;
+		goto disable_clock;
 	}
 
 	regcache_cache_only(wm8962->regmap, false);
@@ -3838,6 +3838,10 @@ static int wm8962_runtime_resume(struct device *dev)
 	msleep(5);
 
 	return 0;
+
+disable_clock:
+	clk_disable_unprepare(wm8962->pdata.mclk);
+	return ret;
 }
 
 static int wm8962_runtime_suspend(struct device *dev)
-- 
2.8.0.rc3

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

end of thread, other threads:[~2016-03-29 17:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28 11:31 [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Fabio Estevam
2016-03-28 11:31 ` [PATCH 2/2] ASoC: wm8962: Fit error message into a single line Fabio Estevam
2016-03-28 12:57   ` Charles Keepax
2016-03-29 17:08   ` Applied "ASoC: wm8962: Fit error message into a single line" to the asoc tree Mark Brown
2016-03-28 12:56 ` [PATCH 1/2] ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails Charles Keepax
2016-03-29 17:08 ` Applied "ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox