Re: [RESEND PATCH 1/2] ASoC: Ux500: Fixup use of clocks

2012-11-09 Thread Mark Brown
On Wed, Nov 07, 2012 at 04:42:41PM +0100, Ulf Hansson wrote:
> From: Ulf Hansson 
> 
> Make sure clocks are being prepared and unprepared as well
> as enabled and disabled.

Both of these patches are already applied...


signature.asc
Description: Digital signature


Re: [RESEND PATCH 1/2] ASoC: Ux500: Fixup use of clocks

2012-11-09 Thread Mark Brown
On Wed, Nov 07, 2012 at 04:42:41PM +0100, Ulf Hansson wrote:
 From: Ulf Hansson ulf.hans...@linaro.org
 
 Make sure clocks are being prepared and unprepared as well
 as enabled and disabled.

Both of these patches are already applied...


signature.asc
Description: Digital signature


[RESEND PATCH 1/2] ASoC: Ux500: Fixup use of clocks

2012-11-07 Thread Ulf Hansson
From: Ulf Hansson 

Make sure clocks are being prepared and unprepared as well
as enabled and disabled.

Acked-by: Linus Walleij 
Signed-off-by: Ulf Hansson 
---
 sound/soc/ux500/ux500_msp_dai.c |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index be94bf9..e11187f 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -398,11 +398,13 @@ static int ux500_msp_dai_startup(struct snd_pcm_substream 
*substream,
return ret;
}
 
-   /* Enable clock */
+   /* Prepare and enable clock */
dev_dbg(dai->dev, "%s: Enabling MSP-clock.\n", __func__);
-   clk_enable(drvdata->clk);
+   ret = clk_prepare_enable(drvdata->clk);
+   if (ret)
+   regulator_disable(drvdata->reg_vape);
 
-   return 0;
+   return ret;
 }
 
 static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
@@ -428,8 +430,8 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream 
*substream,
__func__, dai->id, snd_pcm_stream_str(substream));
}
 
-   /* Disable clock */
-   clk_disable(drvdata->clk);
+   /* Disable and unprepare clock */
+   clk_disable_unprepare(drvdata->clk);
 
/* Disable regulator */
ret = regulator_disable(drvdata->reg_vape);
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RESEND PATCH 1/2] ASoC: Ux500: Fixup use of clocks

2012-11-07 Thread Ulf Hansson
From: Ulf Hansson ulf.hans...@linaro.org

Make sure clocks are being prepared and unprepared as well
as enabled and disabled.

Acked-by: Linus Walleij linus.wall...@linaro.org
Signed-off-by: Ulf Hansson ulf.hans...@linaro.org
---
 sound/soc/ux500/ux500_msp_dai.c |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index be94bf9..e11187f 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -398,11 +398,13 @@ static int ux500_msp_dai_startup(struct snd_pcm_substream 
*substream,
return ret;
}
 
-   /* Enable clock */
+   /* Prepare and enable clock */
dev_dbg(dai-dev, %s: Enabling MSP-clock.\n, __func__);
-   clk_enable(drvdata-clk);
+   ret = clk_prepare_enable(drvdata-clk);
+   if (ret)
+   regulator_disable(drvdata-reg_vape);
 
-   return 0;
+   return ret;
 }
 
 static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
@@ -428,8 +430,8 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream 
*substream,
__func__, dai-id, snd_pcm_stream_str(substream));
}
 
-   /* Disable clock */
-   clk_disable(drvdata-clk);
+   /* Disable and unprepare clock */
+   clk_disable_unprepare(drvdata-clk);
 
/* Disable regulator */
ret = regulator_disable(drvdata-reg_vape);
-- 
1.7.10

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/