Skip to contentSkip to conversation

video: goldfishfb: add devicetree bindings

PATCH In review Alan 2 participants 3 messages Mar 10, 2016 – Mar 18, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Alan

author
#0 lore raw

PATCH v2 1/2 video: goldfishfb: add devicetree bindings

From: Greg Hackmann <[email protected]>

Add device tree bindings to the Goldfish frame buffer interface.

---
 Documentation/devicetree/bindings/goldfish/fb.txt |   17 +++++++++++++++++
 drivers/video/fbdev/goldfishfb.c                  |    9 ++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/goldfish/fb.txt
Documentation/devicetree/bindings/goldfish/fb.txt new file +17 -0
new file mode 100644
index 0000000..8e7a6f8
@@ -0,0 +1,17 @@
+Android Goldfish Framebuffer
+
+Android goldfish framebuffer device generated by android emulator.
+
+Required properties:
+
+- compatible : should contain "google,goldfish-fb" to match emulator
+- reg        : <registers mapping>
+- interrupts : <interrupt mapping>
+
+Example:
+
+	goldfish_fb@9010000 {
+		compatible = "google,goldfish-fb";
+		reg = <0x9010000 0x100>;
+		interrupts = <0x2>;
+	};
drivers/video/fbdev/goldfishfb.c +8 -1
index 7f6c9e6..f0e651b 100644
@@ -304,12 +304,19 @@ static int goldfish_fb_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id goldfish_fb_of_match[] = {
+	{ .compatible = "google,goldfish-fb", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, goldfish_fb_of_match);
 
 static struct platform_driver goldfish_fb_driver = {
 	.probe		= goldfish_fb_probe,
 	.remove		= goldfish_fb_remove,
 	.driver = {
-		.name = "goldfish_fb"
+		.name = "goldfish_fb",
+		.owner = THIS_MODULE,
+		.of_match_table = goldfish_fb_of_match,
 	}
 };
 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160310153845.8996.17736.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

author
#2 lore raw

PATCH v2 2/2 goldfish: Enable ACPI-based enumeration for goldfish framebuffer

From: Yu Ning <[email protected]>

Enable ACPI bindings for the Goldfish framebuffer device.

---
 drivers/video/fbdev/goldfishfb.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/video/fbdev/goldfishfb.c +8 -0
index f0e651b..58b33e4 100644
@@ -26,6 +26,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
+#include <linux/acpi.h>
 
 enum {
 	FB_GET_WIDTH        = 0x00,
@@ -310,6 +311,12 @@ static const struct of_device_id goldfish_fb_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, goldfish_fb_of_match);
 
+static const struct acpi_device_id goldfish_fb_acpi_match[] = {
+	{ "GFSH0004", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, goldfish_fb_acpi_match);
+
 static struct platform_driver goldfish_fb_driver = {
 	.probe		= goldfish_fb_probe,
 	.remove		= goldfish_fb_remove,
@@ -317,6 +324,7 @@ static struct platform_driver goldfish_fb_driver = {
 		.name = "goldfish_fb",
 		.owner = THIS_MODULE,
 		.of_match_table = goldfish_fb_of_match,
+		.acpi_match_table = ACPI_PTR(goldfish_fb_acpi_match),
 	}
 };
 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by
#3 lore raw
In reply to a message not in the archive
Quoted 8 lines · Alan

From: Greg Hackmann <[email protected]>

Add device tree bindings to the Goldfish frame buffer interface.

---

[...]

Quoted 11 lines
drivers/video/fbdev/goldfishfb.c +3 -0
index 7f6c9e6..f0e651b 100644
@@ -304,12 +304,19 @@ static int goldfish_fb_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id goldfish_fb_of_match[] = {
+	{ .compatible = "google,goldfish-fb", },
+	{},

drivers/video/fbdev/goldfishfb.c static int goldfish_fb_remove(struct platform_device *pdev) · line 318

Quoted 10 lines
drivers/video/fbdev/goldfishfb.c +4 -1
+};
+MODULE_DEVICE_TABLE(of, goldfish_fb_of_match);
 
 static struct platform_driver goldfish_fb_driver = {
 	.probe		= goldfish_fb_probe,
 	.remove		= goldfish_fb_remove,
 	.driver = {
-		.name = "goldfish_fb"
+		.name = "goldfish_fb",
+		.owner = THIS_MODULE,

This can be dropped. Otherwise,

Quoted 9 lines
drivers/video/fbdev/goldfishfb.c +1 -1
+		.of_match_table = goldfish_fb_of_match,
 	}
 };
 
 
--

To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html