aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2015-12-02 11:35:59 -0800
committerKees Cook <keescook@chromium.org>2016-01-11 15:16:35 -0800
commit909815c1c41dc026b82bc517ba7115b9fc622784 (patch)
treea91a6754dd2ac98c1abb507c15925b2369d19480
parent5b2f32ee65ad2afcdb62003647bed434145f869a (diff)
downloadv4.1-909815c1c41dc026b82bc517ba7115b9fc622784.tar.gz
FROMLIST: platform: goldfish: pipe: add devicetree bindings
Add bindings so we don't need to rely on goldfish virtual bus for probing any more, which means we don't need ARM and MIPS goldfish board code for instantiating the bus. In the long term we would like to move towards replacing the Android pipe with virtio-vsock that is currently under development. Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Jin Qian <jinqian@android.com> Acked-by: Rob Herring <robh@kernel.org> Bug: 25515960 Patchset: goldfish support Change-Id: If03054b8739bd929434c8137d3a106847a1e9287 Message-Id: <1449084968-30211-4-git-send-email-jinqian@android.com> Signed-off-by: Kees Cook <keescook@chromium.org>
-rw-r--r--Documentation/devicetree/bindings/goldfish/pipe.txt17
-rw-r--r--drivers/platform/goldfish/goldfish_pipe.c10
2 files changed, 26 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/goldfish/pipe.txt b/Documentation/devicetree/bindings/goldfish/pipe.txt
new file mode 100644
index 00000000000..e417a31a1ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/goldfish/pipe.txt
@@ -0,0 +1,17 @@
+Android Goldfish QEMU Pipe
+
+Andorid pipe virtual device generated by android emulator.
+
+Required properties:
+
+- compatible : should contain "google,android-pipe" to match emulator
+- reg : <registers mapping>
+- interrupts : <interrupt mapping>
+
+Example:
+
+ android_pipe@a010000 {
+ compatible = "google,android-pipe";
+ reg = <ff018000 0x2000>;
+ interrupts = <0x12>;
+ };
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index a45bcb51b4a..82f4ce61621 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -624,11 +624,19 @@ static int goldfish_pipe_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id goldfish_pipe_of_match[] = {
+ { .compatible = "google,android-pipe", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, goldfish_pipe_of_match);
+
static struct platform_driver goldfish_pipe = {
.probe = goldfish_pipe_probe,
.remove = goldfish_pipe_remove,
.driver = {
- .name = "goldfish_pipe"
+ .name = "goldfish_pipe",
+ .owner = THIS_MODULE,
+ .of_match_table = goldfish_pipe_of_match,
}
};