All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rahul Sharma <rahul.sharma@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: l.krishna@samsung.com, joshi@samsung.com,
	kyungmin.park@samsung.com, fahad.k@samsung.com,
	rahul.sharma@samsung.com, prashanth.g@samsung.com,
	s.shirish@samsung.com
Subject: [PATCH 02/14] drm: exynos: hdmi: support for platform variants
Date: Fri, 28 Sep 2012 19:55:24 +0530	[thread overview]
Message-ID: <1348842336-2153-3-git-send-email-rahul.sharma@samsung.com> (raw)
In-Reply-To: <1348842336-2153-1-git-send-email-rahul.sharma@samsung.com>

From: Tomasz Stanislawski <t.stanislaws@samsung.com>

This patch implements check if HDMI is version 1.3 by using a driver variant
instead of platform data.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index a6aea6f..b3a802b 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2262,6 +2262,26 @@ void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy)
 		hdmi_hdmiphy = hdmiphy;
 }
 
+enum hdmi_type {
+	HDMI_TYPE13,
+	HDMI_TYPE14,
+};
+
+static struct platform_device_id hdmi_driver_types[] = {
+	{
+		.name		= "s5pv210-hdmi",
+		.driver_data    = HDMI_TYPE13,
+	}, {
+		.name		= "exynos4-hdmi",
+		.driver_data    = HDMI_TYPE13,
+	}, {
+		.name		= "exynos4-hdmi14",
+		.driver_data    = HDMI_TYPE14,
+	}, {
+		/* end node */
+	}
+};
+
 static int __devinit hdmi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -2270,6 +2290,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
 	struct exynos_drm_hdmi_pdata *pdata;
 	struct resource *res;
 	int ret;
+	enum hdmi_type hdmi_type;
 
 	DRM_DEBUG_KMS("[%d]\n", __LINE__);
 
@@ -2300,7 +2321,8 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, drm_hdmi_ctx);
 
-	hdata->is_v13 = pdata->is_v13;
+	hdmi_type = platform_get_device_id(pdev)->driver_data;
+	hdata->is_v13 = (hdmi_type == HDMI_TYPE13);
 	hdata->cfg_hpd = pdata->cfg_hpd;
 	hdata->get_hpd = pdata->get_hpd;
 	hdata->dev = dev;
@@ -2447,6 +2469,7 @@ static SIMPLE_DEV_PM_OPS(hdmi_pm_ops, hdmi_suspend, hdmi_resume);
 struct platform_driver hdmi_driver = {
 	.probe		= hdmi_probe,
 	.remove		= __devexit_p(hdmi_remove),
+	.id_table = hdmi_driver_types,
 	.driver		= {
 		.name	= "exynos4-hdmi",
 		.owner	= THIS_MODULE,
-- 
1.7.0.4

  parent reply	other threads:[~2012-09-28  7:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 14:25 [PATCH 00/14] drm: exynos: hdmi: add dt based support for exynos5 hdmi Rahul Sharma
2012-09-28 14:25 ` [PATCH 01/14] media: s5p-hdmi: add HPD GPIO to platform data Rahul Sharma
2012-09-28 14:25 ` Rahul Sharma [this message]
2012-09-28 14:25 ` [PATCH 03/14] drm: exynos: hdmi: fix interrupt handling Rahul Sharma
2012-09-28 14:25 ` [PATCH 04/14] drm: exynos: hdmi: use s5p-hdmi platform data Rahul Sharma
2012-09-28 14:25 ` [PATCH 05/14] drm: exynos: hdmi: turn off HPD interrupt in HDMI chip Rahul Sharma
2012-09-28 14:25 ` [PATCH 06/14] drm: exynos: remove drm hdmi platform data struct Rahul Sharma
2012-09-28 14:25 ` [PATCH 07/14] drm: exynos: hdmi: add support for exynos5 ddc Rahul Sharma
2012-09-28 14:25 ` [PATCH 08/14] drm: exynos: hdmi: add support for exynos5 hdmiphy Rahul Sharma
2012-09-28 14:25 ` [PATCH 09/14] drm: exynos: hdmi: add support for platform variants for mixer Rahul Sharma
2012-10-02  7:26   ` Joonyoung Shim
2012-09-28 14:25 ` [PATCH 10/14] drm: exynos: hdmi: add support to disable video processor in mixer Rahul Sharma
2012-09-28 14:25 ` [PATCH 11/14] drm: exynos: hdmi: add support for exynos5 mixer Rahul Sharma
2012-10-02  7:27   ` Joonyoung Shim
2012-09-28 14:25 ` [PATCH 12/14] drm: exynos: hdmi: replace is_v13 with version check in hdmi Rahul Sharma
2012-09-28 14:25 ` [PATCH 13/14] drm: exynos: hdmi: add support for exynos5 hdmi Rahul Sharma
2012-09-28 14:25 ` [PATCH 14/14] drm: exynos: hdmi: remove drm common hdmi platform data struct Rahul Sharma
2012-10-02  2:28 ` [PATCH 00/14] drm: exynos: hdmi: add dt based support for exynos5 hdmi Kyungmin Park
2012-10-02  7:31 ` Joonyoung Shim

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=1348842336-2153-3-git-send-email-rahul.sharma@samsung.com \
    --to=rahul.sharma@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fahad.k@samsung.com \
    --cc=joshi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=l.krishna@samsung.com \
    --cc=prashanth.g@samsung.com \
    --cc=s.shirish@samsung.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.