Loading Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt 0 → 100644 +14 −0 Original line number Diff line number Diff line Samsung SMDK audio complex Required properties: - compatible : "samsung,smdk-wm8994" - samsung,i2s-controller: The phandle of the Samsung I2S0 controller - samsung,audio-codec: The phandle of the WM8994 audio codec Example: sound { compatible = "samsung,smdk-wm8994"; samsung,i2s-controller = <&i2s0>; samsung,audio-codec = <&wm8994>; }; arch/arm/boot/dts/exynos5250-smdk5250.dts +15 −3 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ eeprom@51 { compatible = "samsung,s524ad0xd1"; reg = <0x51>; }; wm8994: wm8994@1a { compatible = "wlf,wm8994"; reg = <0x1a>; }; }; i2c@121D0000 { Loading Loading @@ -205,17 +210,24 @@ codec@11000000 { samsung,mfc-l = <0x51000000 0x800000>; }; i2s@03830000 { i2s0: i2s@03830000 { gpios = <&gpz 0 2 0 0>, <&gpz 1 2 0 0>, <&gpz 2 2 0 0>, <&gpz 3 2 0 0>, <&gpz 4 2 0 0>, <&gpz 5 2 0 0>, <&gpz 6 2 0 0>; }; i2s@12D60000 { i2s1: i2s@12D60000 { status = "disabled"; }; i2s@12D70000 { i2s2: i2s@12D70000 { status = "disabled"; }; sound { compatible = "samsung,smdk-wm8994"; samsung,i2s-controller = <&i2s0>; samsung,audio-codec = <&wm8994>; }; }; arch/arm/boot/dts/exynos5250.dtsi +3 −3 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ dwmmc_3: dwmmc3@12230000 { #size-cells = <0>; }; i2s@03830000 { i2s0: i2s@03830000 { compatible = "samsung,i2s-v5"; reg = <0x03830000 0x100>; dmas = <&pdma0 10 Loading @@ -282,7 +282,7 @@ &pdma0 9 samsung,idma-addr = <0x03000000>; }; i2s@12D60000 { i2s1: i2s@12D60000 { compatible = "samsung,i2s-v5"; reg = <0x12D60000 0x100>; dmas = <&pdma1 12 Loading @@ -290,7 +290,7 @@ i2s@12D60000 { dma-names = "tx", "rx"; }; i2s@12D70000 { i2s2: i2s@12D70000 { compatible = "samsung,i2s-v5"; reg = <0x12D70000 0x100>; dmas = <&pdma0 12 Loading sound/soc/samsung/smdk_wm8994.c +26 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include "../codecs/wm8994.h" #include <sound/pcm_params.h> #include <linux/module.h> #include <linux/of.h> /* * Default CFG switch settings to use this driver: Loading Loading @@ -153,9 +154,25 @@ static struct snd_soc_card smdk = { static int smdk_audio_probe(struct platform_device *pdev) { int ret; struct device_node *np = pdev->dev.of_node; struct snd_soc_card *card = &smdk; card->dev = &pdev->dev; if (np) { smdk_dai[0].cpu_dai_name = NULL; smdk_dai[0].cpu_of_node = of_parse_phandle(np, "samsung,i2s-controller", 0); if (!smdk_dai[0].cpu_of_node) { dev_err(&pdev->dev, "Property 'samsung,i2s-controller' missing or invalid\n"); ret = -EINVAL; } smdk_dai[0].platform_name = NULL; smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node; } ret = snd_soc_register_card(card); if (ret) Loading @@ -173,10 +190,19 @@ static int smdk_audio_remove(struct platform_device *pdev) return 0; } #ifdef CONFIG_OF static const struct of_device_id samsung_wm8994_of_match[] = { { .compatible = "samsung,smdk-wm8994", }, {}, }; MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match); #endif /* CONFIG_OF */ static struct platform_driver smdk_audio_driver = { .driver = { .name = "smdk-audio", .owner = THIS_MODULE, .of_match_table = of_match_ptr(samsung_wm8994_of_match), }, .probe = smdk_audio_probe, .remove = smdk_audio_remove, Loading Loading
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt 0 → 100644 +14 −0 Original line number Diff line number Diff line Samsung SMDK audio complex Required properties: - compatible : "samsung,smdk-wm8994" - samsung,i2s-controller: The phandle of the Samsung I2S0 controller - samsung,audio-codec: The phandle of the WM8994 audio codec Example: sound { compatible = "samsung,smdk-wm8994"; samsung,i2s-controller = <&i2s0>; samsung,audio-codec = <&wm8994>; };
arch/arm/boot/dts/exynos5250-smdk5250.dts +15 −3 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ eeprom@51 { compatible = "samsung,s524ad0xd1"; reg = <0x51>; }; wm8994: wm8994@1a { compatible = "wlf,wm8994"; reg = <0x1a>; }; }; i2c@121D0000 { Loading Loading @@ -205,17 +210,24 @@ codec@11000000 { samsung,mfc-l = <0x51000000 0x800000>; }; i2s@03830000 { i2s0: i2s@03830000 { gpios = <&gpz 0 2 0 0>, <&gpz 1 2 0 0>, <&gpz 2 2 0 0>, <&gpz 3 2 0 0>, <&gpz 4 2 0 0>, <&gpz 5 2 0 0>, <&gpz 6 2 0 0>; }; i2s@12D60000 { i2s1: i2s@12D60000 { status = "disabled"; }; i2s@12D70000 { i2s2: i2s@12D70000 { status = "disabled"; }; sound { compatible = "samsung,smdk-wm8994"; samsung,i2s-controller = <&i2s0>; samsung,audio-codec = <&wm8994>; }; };
arch/arm/boot/dts/exynos5250.dtsi +3 −3 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ dwmmc_3: dwmmc3@12230000 { #size-cells = <0>; }; i2s@03830000 { i2s0: i2s@03830000 { compatible = "samsung,i2s-v5"; reg = <0x03830000 0x100>; dmas = <&pdma0 10 Loading @@ -282,7 +282,7 @@ &pdma0 9 samsung,idma-addr = <0x03000000>; }; i2s@12D60000 { i2s1: i2s@12D60000 { compatible = "samsung,i2s-v5"; reg = <0x12D60000 0x100>; dmas = <&pdma1 12 Loading @@ -290,7 +290,7 @@ i2s@12D60000 { dma-names = "tx", "rx"; }; i2s@12D70000 { i2s2: i2s@12D70000 { compatible = "samsung,i2s-v5"; reg = <0x12D70000 0x100>; dmas = <&pdma0 12 Loading
sound/soc/samsung/smdk_wm8994.c +26 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include "../codecs/wm8994.h" #include <sound/pcm_params.h> #include <linux/module.h> #include <linux/of.h> /* * Default CFG switch settings to use this driver: Loading Loading @@ -153,9 +154,25 @@ static struct snd_soc_card smdk = { static int smdk_audio_probe(struct platform_device *pdev) { int ret; struct device_node *np = pdev->dev.of_node; struct snd_soc_card *card = &smdk; card->dev = &pdev->dev; if (np) { smdk_dai[0].cpu_dai_name = NULL; smdk_dai[0].cpu_of_node = of_parse_phandle(np, "samsung,i2s-controller", 0); if (!smdk_dai[0].cpu_of_node) { dev_err(&pdev->dev, "Property 'samsung,i2s-controller' missing or invalid\n"); ret = -EINVAL; } smdk_dai[0].platform_name = NULL; smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node; } ret = snd_soc_register_card(card); if (ret) Loading @@ -173,10 +190,19 @@ static int smdk_audio_remove(struct platform_device *pdev) return 0; } #ifdef CONFIG_OF static const struct of_device_id samsung_wm8994_of_match[] = { { .compatible = "samsung,smdk-wm8994", }, {}, }; MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match); #endif /* CONFIG_OF */ static struct platform_driver smdk_audio_driver = { .driver = { .name = "smdk-audio", .owner = THIS_MODULE, .of_match_table = of_match_ptr(samsung_wm8994_of_match), }, .probe = smdk_audio_probe, .remove = smdk_audio_remove, Loading