From patchwork Thu Oct 4 15:42:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 1545091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 5585DDF6DA for ; Thu, 4 Oct 2012 07:26:58 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TJfnv-00039k-Sk; Thu, 04 Oct 2012 07:25:08 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TJfnX-00035B-NQ for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 07:24:44 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBC00LFOXWSZVQ0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 16:24:37 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 4B.95.03783.5B93D605; Thu, 04 Oct 2012 16:24:37 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-64-506d39b5c29d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id EA.95.03783.5B93D605; Thu, 04 Oct 2012 16:24:37 +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 <0MBC006I9XWMLU10@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 16:24:37 +0900 (KST) From: Rahul Sharma To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH v1 02/14] drm: exynos: hdmi: support for platform variants Date: Thu, 04 Oct 2012 21:12:40 +0530 Message-id: <1349365372-21417-3-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1349365372-21417-1-git-send-email-rahul.sharma@samsung.com> References: <1349365372-21417-1-git-send-email-rahul.sharma@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsWyRsSkTnerZW6AwbM1lhabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugSvj1q0e1oJbAhXTzks3MD7g7WLk5JAQMJH4v2E3O4QtJnHh3nq2 LkYuDiGBpYwSn+9fZ4MpWriphxkiMZ1R4tq5a0wQzgYmiVnfL7CCVLEJ6ErMPviMEcQWEXCV 2LrlJpjNLJAk8f3nJCYQW1jAS+Lm/mUsIDaLgKrE5gOdYDW8Ah4Sf25sgjpDQaJ12SEgm4OD U8BT4sjPRJCwEFDJpA8drBCtAhLfJh9iASmREJCV2HQA7DYJgctsEr37eqGOlpQ4uOIGywRG 4QWMDKsYRVMLkguKk9JzDfWKE3OLS/PS9ZLzczcxAgPw9L9nUjsYVzZYHGIU4GBU4uE17M4J EGJNLCuuzD3EKMHBrCTCu1kxN0CINyWxsiq1KD++qDQntfgQow/QJROZpUST84HRkVcSb2hs Ym5qbGppZGRmaopDWEmct9kjJUBIID2xJDU7NbUgtQhmHBMHp1QDY9H6Us48Ndd7E51ybynN TvzWdOjbreybk1V8Jl2vZ/rHuq1ojcG1lUH71HZlFu3+bMN15dSvlrSvt1MttipOv8KxT19w 2nWXKVEzfsx5pBdmYpycx/dpplzXsQU3y6ZuOp0qtjnTa6v2spqnPl8j3BU3J1SLyVv0vHqy 7cSJxxsravRete2t26jEUpyRaKjFXFScCADYEQpdbQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e+xoO5Wy9wAg52b9S02Pb7G6sDosXlJ fQBjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxq1bPawFtwQqpp2XbmB8 wNvFyMkhIWAisXBTDzOELSZx4d56ti5GLg4hgemMEtfOXWOCcDYwScz6foEVpIpNQFdi9sFn jCC2iICrxNYtN8FsZoEkie8/JzGB2MICXhI39y9jAbFZBFQlNh/oBKvhFfCQ+HNjEzvENgWJ 1mWHgGwODk4BT4kjPxNBwkJAJZM+dLBOYORdwMiwilE0tSC5oDgpPddQrzgxt7g0L10vOT93 EyM4vJ9J7WBc2WBxiFGAg1GJh9ewOydAiDWxrLgy9xCjBAezkgjvZsXcACHelMTKqtSi/Pii 0pzU4kOMPkBHTWSWEk3OB8ZeXkm8obGJuamxqaWJhYmZJQ5hJXHeZo+UACGB9MSS1OzU1ILU IphxTBycUg2MPCmeU+1eh94UNTxROeGaLk/+X9+Uu69fPQzuyIy1N77uVnPrZs/HlRs33HPv aC9/eTbozZeq8vXW+b5bent50tW+TVrxacJky6Ci5XvvHanxPqekKZ2RoG6Rs2nejH3GqVMy raadb3lgUrjknX+4xhcnmf6VWYqVsndf/+H451PSdD4ofoawEktxRqKhFnNRcSIAG7YseJwC AAA= X-CFilter-Loop: Reflected X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.1 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.9 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date -2.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: t.stanislaws@samsung.com, inki.dae@samsung.com, kyungmin.park@samsung.com, joshi@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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,