Skip to content

Commit

Permalink
staging: goldfish: audio: add devicetree bindings
Browse files Browse the repository at this point in the history
Introduce devicetree bindings to the Goldfish staging audio driver.

Signed-off-by: Greg Hackmann <[email protected]>
Signed-off-by: Jin Qian <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
greghackmann authored and gregkh committed Mar 12, 2016
1 parent 76134b3 commit 283ded1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/goldfish/audio.txt
Original file line number Diff line number Diff line change
@@ -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>;
};
9 changes: 8 additions & 1 deletion drivers/staging/goldfish/goldfish_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
};

Expand Down

0 comments on commit 283ded1

Please sign in to comment.