diff mbox

[v2,1/2] video: goldfishfb: add devicetree bindings

Message ID 20160310153845.8996.17736.stgit@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Alan Cox March 10, 2016, 3:39 p.m. UTC
From: Greg Hackmann <ghackmann@google.com>

Add device tree bindings to the Goldfish frame buffer interface.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Jin Qian <jinqian@android.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 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


--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rob Herring (Arm) March 18, 2016, 4:23 p.m. UTC | #1
On Thu, Mar 10, 2016 at 03:39:00PM +0000, Alan wrote:
> From: Greg Hackmann <ghackmann@google.com>
> 
> Add device tree bindings to the Goldfish frame buffer interface.
> 
> Signed-off-by: Greg Hackmann <ghackmann@google.com>
> Signed-off-by: Jin Qian <jinqian@android.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---

[...]

> diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
> index 7f6c9e6..f0e651b 100644
> --- a/drivers/video/fbdev/goldfishfb.c
> +++ b/drivers/video/fbdev/goldfishfb.c
> @@ -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,

This can be dropped. Otherwise,

Acked-by: Rob Herring <robh@kernel.org>

> +		.of_match_table = goldfish_fb_of_match,
>  	}
>  };
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/goldfish/fb.txt b/Documentation/devicetree/bindings/goldfish/fb.txt
new file mode 100644
index 0000000..8e7a6f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/goldfish/fb.txt
@@ -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>;
+	};
diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
index 7f6c9e6..f0e651b 100644
--- a/drivers/video/fbdev/goldfishfb.c
+++ b/drivers/video/fbdev/goldfishfb.c
@@ -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,
 	}
 };