Thread (7 messages) flat view 7 messages, 2 authors, 2016-03-01

Re: [PATCH 1/3] input: goldfish_events: add devicetree bindings

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2016-02-26 20:05:28

On Fri, Feb 26, 2016 at 06:49:34PM +0000, Alan wrote:
From: Greg Hackmann <redacted>

Add device tree bindings to the Goldfish virtual platform event driver.

Signed-off-by: Greg Hackmann <redacted>
Signed-off-by: Jin Qian <redacted>
Signed-off-by: Alan <redacted>
Applied, thank you.
quoted hunk ↗ jump to hunk
---
 .../devicetree/bindings/goldfish/events.txt        |   17 +++++++++++++++++
 drivers/input/keyboard/goldfish_events.c           |    7 +++++++
 2 files changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/goldfish/events.txt
diff --git a/Documentation/devicetree/bindings/goldfish/events.txt b/Documentation/devicetree/bindings/goldfish/events.txt
new file mode 100644
index 0000000..c270066
--- /dev/null
+++ b/Documentation/devicetree/bindings/goldfish/events.txt
@@ -0,0 +1,17 @@
+Android Goldfish Events Keypad
+
+Android goldfish events keypad device generated by android emulator.
+
+Required properties:
+
+- compatible : should contain "google,goldfish-events-keypad" to match emulator
+- reg        : <registers mapping>
+- interrupts : <interrupt mapping>
+
+Example:
+
+	goldfish-events@9040000 {
+		compatible = "google,goldfish-events-keypad";
+		reg = <0x9040000 0x1000>;
+		interrupts = <0x5>;
+	};
diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c
index 907e4e2..b11d218 100644
--- a/drivers/input/keyboard/goldfish_events.c
+++ b/drivers/input/keyboard/goldfish_events.c
@@ -178,10 +178,17 @@ static int events_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id goldfish_events_of_match[] = {
+	{ .compatible = "google,goldfish-events-keypad", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, goldfish_events_of_match);
+
 static struct platform_driver events_driver = {
 	.probe	= events_probe,
 	.driver	= {
 		.name	= "goldfish_events",
+		.of_match_table = goldfish_events_of_match,
 	},
 };
 
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help