All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karol Lewandowski <k.lewandowsk@samsung.com>
To: linux-samsung-soc@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org, thomas.abraham@linaro.org,
	m.szyprowski@samsung.com, kyungmin.park@samsung.com,
	linux-kernel@vger.kernel.org, olof@lixom.net,
	kgene.kim@samsung.com,
	Karol Lewandowski <k.lewandowsk@samsung.com>,
	Kamil Debski <k.debski@samsung.com>
Subject: [PATCH 03/13] s5p-g2d: Make it possible to instantiate driver from DT
Date: Thu, 12 Apr 2012 20:45:22 +0200	[thread overview]
Message-ID: <1334256332-29867-4-git-send-email-k.lewandowsk@samsung.com> (raw)
In-Reply-To: <1334256332-29867-1-git-send-email-k.lewandowsk@samsung.com>

This driver requires standard properties like (address and irq)
which are automatically marshalled for drivers by OF core.

Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kamil Debski <k.debski@samsung.com>
---
 .../devicetree/bindings/arm/trivial-devices.txt    |    1 +
 drivers/media/video/s5p-g2d/g2d.c                  |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/trivial-devices.txt b/Documentation/devicetree/bindings/arm/trivial-devices.txt
index 443814a..d0f6c45 100644
--- a/Documentation/devicetree/bindings/arm/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/arm/trivial-devices.txt
@@ -8,3 +8,4 @@ document for it just like any other devices.
 
 Compatible                      Vendor / Chip
 ========================        =============
+samsung,s5pv210-g2d		2D graphics accelerator found on s5pv210+ SoCs
diff --git a/drivers/media/video/s5p-g2d/g2d.c b/drivers/media/video/s5p-g2d/g2d.c
index 789de74..96fd584 100644
--- a/drivers/media/video/s5p-g2d/g2d.c
+++ b/drivers/media/video/s5p-g2d/g2d.c
@@ -20,6 +20,7 @@
 #include <linux/interrupt.h>
 
 #include <linux/platform_device.h>
+#include <linux/of.h>
 #include <media/v4l2-mem2mem.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
@@ -832,12 +833,21 @@ static int g2d_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id g2d_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-g2d" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, g2d_dt_match);
+#endif
+
 static struct platform_driver g2d_pdrv = {
 	.probe		= g2d_probe,
 	.remove		= g2d_remove,
 	.driver		= {
 		.name = G2D_NAME,
 		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(g2d_dt_match),
 	},
 };
 
-- 
1.7.9.1


WARNING: multiple messages have this Message-ID
From: Karol Lewandowski <k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Kamil Debski <k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	Karol Lewandowski
	<k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org
Subject: [PATCH 03/13] s5p-g2d: Make it possible to instantiate driver from DT
Date: Thu, 12 Apr 2012 20:45:22 +0200	[thread overview]
Message-ID: <1334256332-29867-4-git-send-email-k.lewandowsk@samsung.com> (raw)
In-Reply-To: <1334256332-29867-1-git-send-email-k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

This driver requires standard properties like (address and irq)
which are automatically marshalled for drivers by OF core.

Signed-off-by: Karol Lewandowski <k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: Kamil Debski <k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 .../devicetree/bindings/arm/trivial-devices.txt    |    1 +
 drivers/media/video/s5p-g2d/g2d.c                  |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/trivial-devices.txt b/Documentation/devicetree/bindings/arm/trivial-devices.txt
index 443814a..d0f6c45 100644
--- a/Documentation/devicetree/bindings/arm/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/arm/trivial-devices.txt
@@ -8,3 +8,4 @@ document for it just like any other devices.
 
 Compatible                      Vendor / Chip
 ========================        =============
+samsung,s5pv210-g2d		2D graphics accelerator found on s5pv210+ SoCs
diff --git a/drivers/media/video/s5p-g2d/g2d.c b/drivers/media/video/s5p-g2d/g2d.c
index 789de74..96fd584 100644
--- a/drivers/media/video/s5p-g2d/g2d.c
+++ b/drivers/media/video/s5p-g2d/g2d.c
@@ -20,6 +20,7 @@
 #include <linux/interrupt.h>
 
 #include <linux/platform_device.h>
+#include <linux/of.h>
 #include <media/v4l2-mem2mem.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
@@ -832,12 +833,21 @@ static int g2d_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id g2d_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-g2d" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, g2d_dt_match);
+#endif
+
 static struct platform_driver g2d_pdrv = {
 	.probe		= g2d_probe,
 	.remove		= g2d_remove,
 	.driver		= {
 		.name = G2D_NAME,
 		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(g2d_dt_match),
 	},
 };
 
-- 
1.7.9.1

  parent reply	other threads:[~2012-04-12 18:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 18:45 [RFC/PATCH 00/13] ARM: Exynos4: Add DTS for Samsung's Nuri board Karol Lewandowski
2012-04-12 18:45 ` [PATCH 01/13] regulator: Fix DT node name checking in max8997-pmic Karol Lewandowski
2012-04-24 22:56   ` Olof Johansson
2012-04-24 22:56     ` Olof Johansson
2012-04-24 22:57     ` Olof Johansson
2012-04-12 18:45 ` [PATCH 02/13] ARM: Add document to list devices with trivial DT description Karol Lewandowski
2012-04-12 18:45 ` Karol Lewandowski [this message]
2012-04-12 18:45   ` [PATCH 03/13] s5p-g2d: Make it possible to instantiate driver from DT Karol Lewandowski
2012-04-12 18:45 ` [PATCH 04/13] i2c-pxa: Drop leftover comment Karol Lewandowski
2012-04-12 18:45 ` [PATCH 05/13] i2c: Dynamically assign adapter id if it wasn't explictly specified Karol Lewandowski
2012-04-12 18:45 ` [PATCH 06/13] s5p-tv: Add initial DT-support for SiI9234 Karol Lewandowski
2012-04-12 18:45   ` Karol Lewandowski
2012-04-12 18:45 ` [PATCH 07/13] s5p-tv: Add initial DT-support for TV mixer Karol Lewandowski
2012-04-12 18:45 ` [PATCH 08/13] s5p-tv: Add initial DT-support for HDMIPHY Karol Lewandowski
2012-04-12 18:45 ` [PATCH 09/13] s5p-tv: Move HDMIPHY and MHL subdev probing to dedicated function Karol Lewandowski
2012-04-13  6:42   ` Tomasz Stanislawski
2012-04-12 18:45 ` [PATCH 10/13] s5p-tv: Add DT-support for HDMI driver Karol Lewandowski
2012-04-13  7:21   ` Tomasz Stanislawski
2012-04-12 18:45 ` [PATCH 11/13] ARM: Exynos4: dts: Specify address and size cells for i2c controllers Karol Lewandowski
2012-04-12 18:45 ` [PATCH 12/13] ARM: Exynos4: Add few more i2c OF compat definitions Karol Lewandowski
2012-04-12 18:45 ` [PATCH 13/13] ARM: dts: Add initial dts for Samsung's NURI board based on Exynos4210 Karol Lewandowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334256332-29867-4-git-send-email-k.lewandowsk@samsung.com \
    --to=k.lewandowsk@samsung.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=k.debski@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=olof@lixom.net \
    --cc=thomas.abraham@linaro.org \
    --subject='Re: [PATCH 03/13] s5p-g2d: Make it possible to instantiate driver from DT' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.