aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
commitc291f76d24a4190551a42b7b77a2cfeb3f4d36f9 (patch)
tree8f9211217d7e2cbaa78d10b596d81e646b3b9aad /target/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch
parent0e26998162921c65cbfe2814e500c81ca7b50dad (diff)
downloadmaster-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.gz
master-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.bz2
master-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.zip
brcm2708: update to v3.18
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44392 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch')
-rwxr-xr-xtarget/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch b/target/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch
new file mode 100755
index 0000000000..f27224ac25
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.18/0100-HiFiBerry-Amp-fix-device-tree-problems.patch
@@ -0,0 +1,59 @@
+From 115f744544291c3529868e72f101df652b156e56 Mon Sep 17 00:00:00 2001
+From: Daniel Matuschek <daniel@hifiberry.com>
+Date: Tue, 3 Feb 2015 07:15:19 +0100
+Subject: [PATCH 100/114] HiFiBerry Amp: fix device-tree problems
+
+Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.
+---
+ sound/soc/bcm/hifiberry_amp.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c
+index 1e87ee0..5903915 100644
+--- a/sound/soc/bcm/hifiberry_amp.c
++++ b/sound/soc/bcm/hifiberry_amp.c
+@@ -65,6 +65,12 @@ static struct snd_soc_card snd_rpi_hifiberry_amp = {
+ .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai),
+ };
+
++static const struct of_device_id snd_rpi_hifiberry_amp_of_match[] = {
++ { .compatible = "hifiberry,hifiberry-amp", },
++ {},
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_amp_of_match);
++
+
+ static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev)
+ {
+@@ -72,6 +78,20 @@ static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev)
+
+ snd_rpi_hifiberry_amp.dev = &pdev->dev;
+
++ if (pdev->dev.of_node) {
++ struct device_node *i2s_node;
++ struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_amp_dai[0];
++ i2s_node = of_parse_phandle(pdev->dev.of_node,
++ "i2s-controller", 0);
++
++ if (i2s_node) {
++ dai->cpu_dai_name = NULL;
++ dai->cpu_of_node = i2s_node;
++ dai->platform_name = NULL;
++ dai->platform_of_node = i2s_node;
++ }
++ }
++
+ ret = snd_soc_register_card(&snd_rpi_hifiberry_amp);
+
+ if (ret != 0) {
+@@ -92,6 +112,7 @@ static struct platform_driver snd_rpi_hifiberry_amp_driver = {
+ .driver = {
+ .name = "snd-hifiberry-amp",
+ .owner = THIS_MODULE,
++ .of_match_table = snd_rpi_hifiberry_amp_of_match,
+ },
+ .probe = snd_rpi_hifiberry_amp_probe,
+ .remove = snd_rpi_hifiberry_amp_remove,
+--
+1.8.3.2
+