소스 검색

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>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Hackmann 10 년 전
부모
커밋
91a18a4141
2개의 변경된 파일26개의 추가작업 그리고 1개의 파일을 삭제
  1. 17 0
      Documentation/devicetree/bindings/goldfish/pipe.txt
  2. 9 1
      drivers/platform/goldfish/goldfish_pipe.c

+ 17 - 0
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>;
+	};

+ 9 - 1
drivers/platform/goldfish/goldfish_pipe.c

@@ -624,11 +624,19 @@ static int goldfish_pipe_remove(struct platform_device *pdev)
 	return 0;
 	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 = {
 static struct platform_driver goldfish_pipe = {
 	.probe = goldfish_pipe_probe,
 	.probe = goldfish_pipe_probe,
 	.remove = goldfish_pipe_remove,
 	.remove = goldfish_pipe_remove,
 	.driver = {
 	.driver = {
-		.name = "goldfish_pipe"
+		.name = "goldfish_pipe",
+		.owner = THIS_MODULE,
+		.of_match_table = goldfish_pipe_of_match,
 	}
 	}
 };
 };