1 From cdf6acdd6a6270538b0fdd08e79986d4a553062a Mon Sep 17 00:00:00 2001
2 From: gtrainavicius <gtrainavicius@users.noreply.github.com>
3 Date: Sat, 10 Dec 2016 16:05:25 +0200
4 Subject: [PATCH] Pisound dynamic overlay (#1760)
6 Restructuring pisound-overlay.dts, so it can be loaded and unloaded dynamically using dtoverlay.
8 Print a logline when the kernel module is removed.
10 arch/arm/boot/dts/overlays/pisound-overlay.dts | 94 ++++++++++++++------------
11 sound/soc/bcm/pisound.c | 2 +
12 2 files changed, 52 insertions(+), 44 deletions(-)
14 diff --git a/arch/arm/boot/dts/overlays/pisound-overlay.dts b/arch/arm/boot/dts/overlays/pisound-overlay.dts
15 index 7cdfc29..5197e65 100644
16 --- a/arch/arm/boot/dts/overlays/pisound-overlay.dts
17 +++ b/arch/arm/boot/dts/overlays/pisound-overlay.dts
19 compatible = "brcm,bcm2708";
29 + target = <&spidev0>;
31 + status = "disabled";
36 + target = <&spidev1>;
45 + #address-cells = <1>;
48 + pisound_spi: pisound_spi@0{
49 + compatible = "blokaslabs,pisound-spi";
51 + pinctrl-names = "default";
52 + pinctrl-0 = <&spi0_pins>;
53 + spi-max-frequency = <1000000>;
62 + #sound-dai-cells = <0>;
63 + compatible = "ti,pcm5102a";
72 compatible = "blokaslabs,pisound";
81 pinctrl-names = "default";
98 - #sound-dai-cells = <0>;
99 - compatible = "ti,pcm5102a";
111 - status = "disabled";
123 - #address-cells = <1>;
126 - pisound_spi: pisound_spi@0{
127 - compatible = "blokaslabs,pisound-spi";
129 - pinctrl-names = "default";
130 - pinctrl-0 = <&spi0_pins>;
131 - spi-max-frequency = <1000000>;
136 diff --git a/sound/soc/bcm/pisound.c b/sound/soc/bcm/pisound.c
137 index a3cd089..30903fcf 100644
138 --- a/sound/soc/bcm/pisound.c
139 +++ b/sound/soc/bcm/pisound.c
140 @@ -954,6 +954,8 @@ static int pisnd_probe(struct platform_device *pdev)
142 static int pisnd_remove(struct platform_device *pdev)
144 + printi("Unloading.\n");
147 kobject_put(pisnd_kobj);