]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: goldfish: audio: add devicetree bindings
authorGreg Hackmann <ghackmann@google.com>
Fri, 26 Feb 2016 19:00:03 +0000 (19:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Introduce devicetree bindings to the Goldfish staging audio driver.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Jin Qian <jinqian@android.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/goldfish/audio.txt [new file with mode: 0644]
drivers/staging/goldfish/goldfish_audio.c

diff --git a/Documentation/devicetree/bindings/goldfish/audio.txt b/Documentation/devicetree/bindings/goldfish/audio.txt
new file mode 100644 (file)
index 0000000..d043fda
--- /dev/null
@@ -0,0 +1,17 @@
+Android Goldfish Audio
+
+Android goldfish audio device generated by android emulator.
+
+Required properties:
+
+- compatible : should contain "google,goldfish-audio" to match emulator
+- reg        : <registers mapping>
+- interrupts : <interrupt mapping>
+
+Example:
+
+       goldfish_audio@9030000 {
+               compatible = "google,goldfish-audio";
+               reg = <0x9030000 0x100>;
+               interrupts = <0x4>;
+       };
index 364fdcdd3a06ea101a4f5067e500c4e45ee0397e..bb5c424a428b15635cf01d012583bc52ab1fd5fa 100644 (file)
@@ -344,11 +344,18 @@ static int goldfish_audio_remove(struct platform_device *pdev)
        return 0;
 }
 
+static const struct of_device_id goldfish_audio_of_match[] = {
+       { .compatible = "google,goldfish-audio", },
+       {},
+};
+MODULE_DEVICE_TABLE(of, goldfish_audio_of_match);
+
 static struct platform_driver goldfish_audio_driver = {
        .probe          = goldfish_audio_probe,
        .remove         = goldfish_audio_remove,
        .driver = {
-               .name = "goldfish_audio"
+               .name = "goldfish_audio",
+               .of_match_table = goldfish_audio_of_match,
        }
 };