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: 1544941 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1F8E83FD9C for ; Thu, 4 Oct 2012 07:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696Ab2JDHYl (ORCPT ); Thu, 4 Oct 2012 03:24:41 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:33809 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611Ab2JDHYi (ORCPT ); Thu, 4 Oct 2012 03:24:38 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBC00CTLXVK9PN0@mailout4.samsung.com> for linux-media@vger.kernel.org; Thu, 04 Oct 2012 16:24:37 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E6.49.03860.5B93D605; Thu, 04 Oct 2012 16:24:37 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-ca-506d39b523f6 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 66.49.03860.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-media@vger.kernel.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 Cc: t.stanislaws@samsung.com, inki.dae@samsung.com, kyungmin.park@samsung.com, joshi@samsung.com 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+NgFrrFLMWRmVeSWpSXmKPExsWyRsSkVnerZW6AwZk9VhY9G7ayOjB6fN4k F8AYxWWTkpqTWZZapG+XwJVx61YPa8EtgYpp56UbGB/wdjFyckgImEgs//SaDcIWk7hwbz2Q zcUhJLCUUeLtrJ9sMEVL248xQySmM0rMPvWaHcJZziQx/elsZpAqNgFdidkHnzGC2CICrhJb t9wEs5kFkiS+/5zEBGILC3hJ3Ny/jAXEZhFQldh8oBOshlfAQ+LPjU3sENsUJFqXHQKyOTg4 BTwljvxMBAkLAZVM+tDBCtEqIPFt8iEWkBIJAVmJTQfAbpMQOMMmcfrobUaIMZISB1fcYJnA KLyAkWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRmAAnv73THoH46oGi0OMAhyMSjy8FpNy AoRYE8uKK3MPMUpwMCuJ8G5WzA0Q4k1JrKxKLcqPLyrNSS0+xOgDdMlEZinR5HxgdOSVxBsa m5ibGptaGhmZmZriEFYS5232SAkQEkhPLEnNTk0tSC2CGcfEwSnVwCjObf7Ee8vhp//L1kqu 7THRfCv49NWa2fdP72N6yP9GQeMd77du1hmHGk/xLlklJ9icz+bYdmhny32NwFlJiS0zm9wc OTpWhpkmPrI2eLd23aaaN4FCK9+Ja/+a5XDNVInLMPjrfs731X1vuNuvcFn1rZts6Oz1yspm S/mXcv7M9NfayazeSkosxRmJhlrMRcWJACpC1WVtAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e+xoO5Wy9wAg7uLDSx6NmxldWD0+LxJ LoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsIYx49atHtaCWwIV085LNzA+ 4O1i5OSQEDCRWNp+jBnCFpO4cG89WxcjF4eQwHRGidmnXrNDOMuZJKY/nQ1WxSagKzH74DNG EFtEwFVi65abYDazQJLE95+TmEBsYQEviZv7l7GA2CwCqhKbD3SC1fAKeEj8ubGJHWKbgkTr skNANgcHp4CnxJGfiSBhIaCSSR86WCcw8i5gZFjFKJpakFxQnJSea6RXnJhbXJqXrpecn7uJ ERzez6R3MK5qsDjEKMDBqMTDazEpJ0CINbGsuDL3EKMEB7OSCO9mxdwAId6UxMqq1KL8+KLS nNTiQ4w+QEdNZJYSTc4Hxl5eSbyhsYm5qbGppYmFiZklDmElcd5mj5QAIYH0xJLU7NTUgtQi mHFMHJxSDYySLU7TtRrldqdH3G9mYU4tSp98/PCr6uXFC698vaDif78jYMnpTU7xGyYE1MYq 8R8U8XbWyovbIDWrVeLPtCUfjOINjV7X7utMXDp3yY2T/xp3WgROvZwYyKoetu5uaIR7+LUf N6eslu1anpBRm+6+t+Uzp0l6baskk4CZ8G5Rx5edGorS2kosxRmJhlrMRcWJAACsM72cAgAA X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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,