diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-05-16 10:35:25 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-16 10:35:25 -0400 |
commit | 3c0dec5f58b3c7b3627715126d1bf9b030a076f0 (patch) | |
tree | 4bf8f56fca3bf6be109209b116fc8e32cb2e0f9e /sound | |
parent | fcd8d84a585f3578a9ebdd27e757495a27415322 (diff) | |
parent | 7e0fa1b5fa91d9aa456d102c273b2cf0f2e95d39 (diff) |
Merge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next/clock
* 'clk-next' of git://git.linaro.org/people/mturquette/linux:
clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
clk: Provide dummy clk_unregister()
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
ARM: Orion: SDIO: Add support for clk.
ARM: Orion: NAND: Add support for clk, if there is one.
ARM: Orion: EHCI: Add support for enabling clocks
ARM: Orion: SATA: Add per channel clk/clkdev support.
ARM: Orion: UART: Get the clock rate via clk_get_rate().
ARM: Orion: WDT: Add clk/clkdev support
ARM: Orion: Eth: Add clk/clkdev support.
ARM: Orion: SPI: Add clk/clkdev support.
ARM: Orion: Add clocks using the generic clk infrastructure.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'sound')
-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 @@ | |||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/mbus.h> | 18 | #include <linux/mbus.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/clk.h> | ||
20 | #include <sound/pcm.h> | 21 | #include <sound/pcm.h> |
21 | #include <sound/pcm_params.h> | 22 | #include <sound/pcm_params.h> |
22 | #include <sound/soc.h> | 23 | #include <sound/soc.h> |
@@ -449,6 +450,14 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev) | |||
449 | 450 | ||
450 | priv->burst = data->burst; | 451 | priv->burst = data->burst; |
451 | 452 | ||
453 | priv->clk = clk_get(&pdev->dev, NULL); | ||
454 | if (IS_ERR(priv->clk)) { | ||
455 | dev_err(&pdev->dev, "no clock\n"); | ||
456 | err = PTR_ERR(priv->clk); | ||
457 | goto err_ioremap; | ||
458 | } | ||
459 | clk_prepare_enable(priv->clk); | ||
460 | |||
452 | return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); | 461 | return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); |
453 | 462 | ||
454 | err_ioremap: | 463 | err_ioremap: |
@@ -466,6 +475,10 @@ static __devexit int kirkwood_i2s_dev_remove(struct platform_device *pdev) | |||
466 | struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev); | 475 | struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev); |
467 | 476 | ||
468 | snd_soc_unregister_dai(&pdev->dev); | 477 | snd_soc_unregister_dai(&pdev->dev); |
478 | |||
479 | clk_disable_unprepare(priv->clk); | ||
480 | clk_put(priv->clk); | ||
481 | |||
469 | iounmap(priv->io); | 482 | iounmap(priv->io); |
470 | release_mem_region(priv->mem->start, SZ_16K); | 483 | release_mem_region(priv->mem->start, SZ_16K); |
471 | kfree(priv); | 484 | 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 { | |||
123 | void __iomem *io; | 123 | void __iomem *io; |
124 | int irq; | 124 | int irq; |
125 | int burst; | 125 | int burst; |
126 | struct clk *clk; | ||
126 | }; | 127 | }; |
127 | 128 | ||
128 | #endif | 129 | #endif |