From patchwork Thu Oct 4 15:18:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 1545561 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 06F18DF238 for ; Thu, 4 Oct 2012 09:20:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E18D1A0C76 for ; Thu, 4 Oct 2012 02:20:46 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id CF7289E775 for ; Thu, 4 Oct 2012 00:01:15 -0700 (PDT) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBC00EMEWQGIZ30@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 04 Oct 2012 16:01:04 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 41.22.03860.F243D605; Thu, 04 Oct 2012 16:01:04 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-b9-506d342fbc42 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 90.22.03860.F243D605; Thu, 04 Oct 2012 16:01:03 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MBC0040MWSZQ360@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 04 Oct 2012 16:01:03 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org Subject: [PATCH v1 02/14] drm: exynos: hdmi: support for platform variants Date: Thu, 04 Oct 2012 20:48:44 +0530 Message-id: <1349363936-8531-3-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1349363936-8531-1-git-send-email-rahul.sharma@samsung.com> References: <1349363936-8531-1-git-send-email-rahul.sharma@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsWyRsSkStfAJDfAYJazxZWv79kcGD3udx9n CmCM4rJJSc3JLEst0rdL4Mq4dauHteCWQMW089INjA94uxg5OSQETCSmTVvJCmGLSVy4t54N xBYSWMooca+tBqbm2cLL7F2MXEDx6YwSt9onskE4q5kkbvbdZAGpYhPQlZh98BkjiC0ioCzx d+IqRpAiZoFFTBL/7nxgB0kIC3hJ3Ny/DKyBRUBVovN4D1icV8Bd4vj/U1BnKEi0LjsEFucU 8JBY+OsGO8RJ7hJPrl1ihOgVkPg2+RDQHA6gelmJTQeYQXZJCFxmk7hwbhU7xBxJiYMrbrBM YBRewMiwilE0tSC5oDgpPddIrzgxt7g0L10vOT93EyMwBE//eya9g3FVg8UhRgEORiUeXotJ OQFCrIllxZW5hxglOJiVRHg3K+YGCPGmJFZWpRblxxeV5qQWH2L0AbpkIrOUaHI+MD7ySuIN jU3MTY1NLY2MzExNcQgrifM2e6QECAmkJ5akZqemFqQWwYxj4uCUamBk+5uq0CvjeDVn6Q1Z jRXfNgme+GblMWHabt2Yu0lf2q648r5qEOmRdl7nNftig8ts/W0xxXwKq/uP2IiWJz35erK/ JIth7ayOZuN9fC+09hw+e2RLXyrTVwmztb/jSy7rGTw+K3Ouds0DtvlXvRm0wgPVkhv85st2 bu3dn31r4WHjUzufZ8spsRRnJBpqMRcVJwIA7TnEym4CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xoK6+SW6AwfLFphZXvr5nc2D0uN99 nCmAMaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH aKySQlliTilQKCCxuFhJ3w7ThNAQN10LmMYIXd+QILgeIwM0kLCGMePWrR7WglsCFdPOSzcw PuDtYuTkkBAwkXi28DI7hC0mceHeerYuRi4OIYHpjBK32idCOauZJG723WQBqWIT0JWYffAZ I4gtIqAs8XfiKkaQImaBRUwS/+58ABslLOAlcXP/MrAGFgFVic7jPWBxXgF3ieP/T7FCrFOQ aF12CCzOKeAhsfDXDTBbCKjmybVLjBMYeRcwMqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93E CA7yZ9I7GFc1WBxiFOBgVOLhtZiUEyDEmlhWXJl7iFGCg1lJhHezYm6AEG9KYmVValF+fFFp TmrxIUYfoKsmMkuJJucDIzCvJN7Q2MTc1NjU0sTCxMwSh7CSOG+zR0qAkEB6YklqdmpqQWoR zDgmDk6pBkbVBW390pp3Ht83vyjqrf+Dv6pN6kDuOemzp2QXpYgfyvSqjpy5T/OFUaiim9eR bWe3HfVbsOBygm5f5rSk9YlGuXeuLOFb9kHw8uO9tT+PTExOPm7auzfN0JhT8cDhT8pN9a+N njpFH1fhWa2VdfZM0PNf0/wkdjfoBmZ1iOjoqG9mfOrHrq/EUpyRaKjFXFScCADp5kDRnwIA AA== X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 04 Oct 2012 00:53:40 -0700 Cc: t.stanislaws@samsung.com, 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Tomasz Stanislawski This patch implements check if HDMI is version 1.3 by using a driver variant instead of platform data. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park --- 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,