diff mbox

drm/omap: Add device tree support to DMM

Message ID 1363725366-4091-1-git-send-email-andy.gross@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Gross March 19, 2013, 8:36 p.m. UTC
Added in detection/support for DMM devices when booting with device
tree.

Signed-off-by: Andy Gross <andy.gross@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Comments

Rob Clark March 20, 2013, 2:44 p.m. UTC | #1
On Tue, Mar 19, 2013 at 4:36 PM, Andy Gross <andy.gross@ti.com> wrote:
> Added in detection/support for DMM devices when booting with device
> tree.
>
> Signed-off-by: Andy Gross <andy.gross@ti.com>

Reviewed-by: Rob Clark <robdclark@gmail.com>

> ---
>  drivers/gpu/drm/omapdrm/omap_dmm_tiler.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> index 9b794c9..d84f37c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> @@ -29,6 +29,7 @@
>  #include <linux/mm.h>
>  #include <linux/time.h>
>  #include <linux/list.h>
> +#include <linux/of.h>
>
>  #include "omap_dmm_tiler.h"
>  #include "omap_dmm_priv.h"
> @@ -968,6 +969,14 @@ static const struct dev_pm_ops omap_dmm_pm_ops = {
>  };
>  #endif
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id omap_dmm_of_match[] = {
> +       {.compatible = "ti,dmm", },
> +       {},
> +};
> +MODULE_DEVICE_TABLE(of, omap_dmm_of_match);
> +#endif
> +
>  struct platform_driver omap_dmm_driver = {
>         .probe = omap_dmm_probe,
>         .remove = omap_dmm_remove,
> @@ -977,6 +986,7 @@ struct platform_driver omap_dmm_driver = {
>  #ifdef CONFIG_PM
>                 .pm = &omap_dmm_pm_ops,
>  #endif
> +               .of_match_table = of_match_ptr(omap_dmm_of_match),
>         },
>  };
>
> --
> 1.7.5.4
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 9b794c9..d84f37c 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -29,6 +29,7 @@ 
 #include <linux/mm.h>
 #include <linux/time.h>
 #include <linux/list.h>
+#include <linux/of.h>
 
 #include "omap_dmm_tiler.h"
 #include "omap_dmm_priv.h"
@@ -968,6 +969,14 @@  static const struct dev_pm_ops omap_dmm_pm_ops = {
 };
 #endif
 
+#ifdef CONFIG_OF
+static const struct of_device_id omap_dmm_of_match[] = {
+	{.compatible = "ti,dmm", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, omap_dmm_of_match);
+#endif
+
 struct platform_driver omap_dmm_driver = {
 	.probe = omap_dmm_probe,
 	.remove = omap_dmm_remove,
@@ -977,6 +986,7 @@  struct platform_driver omap_dmm_driver = {
 #ifdef CONFIG_PM
 		.pm = &omap_dmm_pm_ops,
 #endif
+		.of_match_table = of_match_ptr(omap_dmm_of_match),
 	},
 };