in order to support audio, also switch it to CCF.
This patch series based on next-2014-0604 tag.
Changes in v2:
- wm8904: Remove the mclk checking when try to enable or disable it,
as it is checked when required.
- dt: List the clock-names, which need by driver.
Bo Shen (5):
ASoC: atmel_wm8904: switch to CCF
ASoC: wm8904: switch to CCF
dt: wm8904: add device tree binding document
ARM: atmel: sama5d3xek: switch sound to CCF
ARM: atmel: at91sam9n12ek: switch sound to CCF
Documentation/devicetree/bindings/sound/wm8904.txt | 33 ++++++++++++++
arch/arm/boot/dts/at91sam9n12ek.dts | 2 +
arch/arm/boot/dts/sama5d3xmb.dtsi | 2 +
sound/soc/atmel/atmel_wm8904.c | 50 ----------------------
sound/soc/codecs/wm8904.c | 11 +++++
5 files changed, 48 insertions(+), 50 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/wm8904.txt
--
1.8.5.2
@@ -153,7 +128,6 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev){structsnd_soc_card*card=&atmel_asoc_wm8904_card;structsnd_soc_dai_link*dailink=&atmel_asoc_wm8904_dailink;-structclk*clk_src;intid,ret;card->dev=&pdev->dev;
@@ -170,30 +144,6 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev)returnret;}-mclk=clk_get(NULL,"pck0");-if(IS_ERR(mclk)){-dev_err(&pdev->dev,"failed to get pck0\n");-ret=PTR_ERR(mclk);-gotoerr_set_audio;-}--clk_src=clk_get(NULL,"clk32k");-if(IS_ERR(clk_src)){-dev_err(&pdev->dev,"failed to get clk32k\n");-ret=PTR_ERR(clk_src);-gotoerr_set_audio;-}--ret=clk_set_parent(mclk,clk_src);-clk_put(clk_src);-if(ret!=0){-dev_err(&pdev->dev,"failed to set MCLK parent\n");-gotoerr_set_audio;-}--dev_info(&pdev->dev,"setting pck0 to %dHz\n",MCLK_RATE);-clk_set_rate(mclk,MCLK_RATE);-ret=snd_soc_register_card(card);if(ret){dev_err(&pdev->dev,"snd_soc_register_card failed\n");
Enable WM8904 to support common clock framework.
Signed-off-by: Bo Shen <redacted>
---
Changes in v2:
- Remove the mclk checking when try to enable or disable it,
as it is checked when required.
sound/soc/codecs/wm8904.c | 11 +++++++++++
1 file changed, 11 insertions(+)
@@ -1828,6 +1830,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec,switch(level){caseSND_SOC_BIAS_ON:+clk_prepare_enable(wm8904->mclk);break;caseSND_SOC_BIAS_PREPARE:
@@ -1894,6 +1897,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec,regulator_bulk_disable(ARRAY_SIZE(wm8904->supplies),wm8904->supplies);+clk_disable_unprepare(wm8904->mclk);break;}codec->dapm.bias_level=level;
@@ -2110,6 +2114,13 @@ static int wm8904_i2c_probe(struct i2c_client *i2c,if(wm8904==NULL)return-ENOMEM;+wm8904->mclk=devm_clk_get(&i2c->dev,"mclk");+if(IS_ERR(wm8904->mclk)){+ret=PTR_ERR(wm8904->mclk);+dev_err(&i2c->dev,"Failed to get MCLK\n");+returnret;+}+wm8904->regmap=devm_regmap_init_i2c(i2c,&wm8904_regmap);if(IS_ERR(wm8904->regmap)){ret=PTR_ERR(wm8904->regmap);
Signed-off-by: Bo Shen <redacted>
---
Changes in v2:
- List the clock-names, which need by driver.
Documentation/devicetree/bindings/sound/wm8904.txt | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/wm8904.txt
As the sama5d3xek board has switch to CCF, so add clock for wm8904
Signed-off-by: Bo Shen <redacted>
Reviwed-by: Mark Brown [off-list ref]
---
Changes in v2:
- None
arch/arm/boot/dts/sama5d3xmb.dtsi | 2 ++
1 file changed, 2 insertions(+)
As the at91sam9n12ek has switch to CCF, so add clock for wm8904
Signed-off-by: Bo Shen <redacted>
Reviwed-by: Mark Brown [off-list ref]
---
Changes in v2:
- None
arch/arm/boot/dts/at91sam9n12ek.dts | 2 ++
1 file changed, 2 insertions(+)