diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-26 23:42:29 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-26 23:42:29 +0400 |
commit | 27953437059c64d14086196eb96f43c78caa9db3 (patch) | |
tree | 0cfd5fb21262a6db3de0c64462847b4c0c43e9df /sound/soc | |
parent | 2c757fd5d1a92086f225a75a8fac7cab242d11b0 (diff) | |
parent | 3c0dec5f58b3c7b3627715126d1bf9b030a076f0 (diff) | |
download | linux-27953437059c64d14086196eb96f43c78caa9db3.tar.xz |
Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc clock driver changes from Olof Johansson:
"The new clock subsystem was merged in linux-3.4 without any users,
this now moves the first three platforms over to it: imx, mxs and
spear.
The series also contains the changes for the clock subsystem itself,
since Mike preferred to have it together with the platforms that
require these changes, in order to avoid interdependencies and
conflicts."
Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
removed in one branch, added OF support in another) and
drivers/dma/imx-sdma.c (independent changes next to each other).
* tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
clk: Provide dummy clk_unregister()
SPEAr: Update defconfigs
SPEAr: Add SMI NOR partition info in dts files
SPEAr: Switch to common clock framework
SPEAr: Call clk_prepare() before calling clk_enable
SPEAr: clk: Add General Purpose Timer Synthesizer clock
SPEAr: clk: Add Fractional Synthesizer clock
SPEAr: clk: Add Auxiliary Synthesizer clock
SPEAr: clk: Add VCO-PLL Synthesizer clock
SPEAr: Add DT bindings for SPEAr's timer
ARM i.MX: remove now unused clock files
ARM: i.MX6: implement clocks using common clock framework
ARM i.MX35: implement clocks using common clock framework
ARM i.MX5: implement clocks using common clock framework
ARM: Kirkwood: Replace clock gating
ARM: Orion: Audio: Add clk/clkdev support
ARM: Orion: PCIE: Add support for clk
ARM: Orion: XOR: Add support for clk
ARM: Orion: CESA: Add support for clk
...
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 13 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 3cb9aa4299d3..fa4556750451 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -17,6 +17,7 @@ #include <linux/slab.h> #include <linux/mbus.h> #include <linux/delay.h> +#include <linux/clk.h> #include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/soc.h> @@ -449,6 +450,14 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev) priv->burst = data->burst; + priv->clk = clk_get(&pdev->dev, NULL); + if (IS_ERR(priv->clk)) { + dev_err(&pdev->dev, "no clock\n"); + err = PTR_ERR(priv->clk); + goto err_ioremap; + } + clk_prepare_enable(priv->clk); + return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); err_ioremap: @@ -466,6 +475,10 @@ static __devexit int kirkwood_i2s_dev_remove(struct platform_device *pdev) struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev); snd_soc_unregister_dai(&pdev->dev); + + clk_disable_unprepare(priv->clk); + clk_put(priv->clk); + iounmap(priv->io); release_mem_region(priv->mem->start, SZ_16K); kfree(priv); diff --git a/sound/soc/kirkwood/kirkwood.h b/sound/soc/kirkwood/kirkwood.h index 9047436b3937..f9084d83e6bd 100644 --- a/sound/soc/kirkwood/kirkwood.h +++ b/sound/soc/kirkwood/kirkwood.h @@ -123,6 +123,7 @@ struct kirkwood_dma_data { void __iomem *io; int irq; int burst; + struct clk *clk; }; #endif |