From patchwork Mon Jul 2 08:48:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9728 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7196323E23 for ; Mon, 2 Jul 2012 09:01:16 +0000 (UTC) Received: from mail-yw0-f47.google.com (mail-yw0-f47.google.com [209.85.213.47]) by fiordland.canonical.com (Postfix) with ESMTP id 2C38EA18AC9 for ; Mon, 2 Jul 2012 09:01:16 +0000 (UTC) Received: by yhjj56 with SMTP id j56so4846232yhj.20 for ; Mon, 02 Jul 2012 02:01:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=rZk16a/ho+GVLpJsEtEzb8Bn2MIYoyKhvT7Vr2beE7U=; b=eva4b2gkzNhHK3w12Avi6lYxMItaF/xD9MMMlXmQCUXeUJn+gN/kSx3gmIXgxtc8GB +ktTM6DeYDWW1u4f4eYhfwRS4cmpElHUjHeYj+yHckzat36Xiul0afXEQm376O1GENw1 +HqkRyTKx3CdnFZXYMlCpuqY/6wYLo1lGGQXIMiMETZPDIy81GnEs0i/84F5IVmeQlRP g4N/IqyA/BSBoJLoPd3j4e0QiJApsvXcI63IDQ36mf0vU+13SeAY2yHLP1uM8+WJNr00 ITPJpfQ5Oynn30nfVj1AIR842AnXGd4UKBUFW7hLF7la12OZoJp06AI4A8jH3mUkEtXb XJ8g== Received: by 10.50.87.227 with SMTP id bb3mr4682960igb.57.1341219675283; Mon, 02 Jul 2012 02:01:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp19353ibb; Mon, 2 Jul 2012 02:01:14 -0700 (PDT) Received: by 10.66.83.200 with SMTP id s8mr19941579pay.10.1341219674444; Mon, 02 Jul 2012 02:01:14 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id pd7si20705155pbc.54.2012.07.02.02.01.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 02:01:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pz0-f50.google.com with SMTP id h15so8438248dan.37 for ; Mon, 02 Jul 2012 02:01:14 -0700 (PDT) Received: by 10.66.74.66 with SMTP id r2mr19896217pav.45.1341219674053; Mon, 02 Jul 2012 02:01:14 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id np8sm12524649pbc.71.2012.07.02.02.01.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 02:01:13 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, sachin.kamat@linaro.org, tushar.behera@linaro.org, patches@linaro.org Subject: [PATCH 2/4] ARM: SAMSUNG: Add API to set platform data for s5p-tv driver Date: Mon, 2 Jul 2012 14:18:50 +0530 Message-Id: <1341218932-15846-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1341218932-15846-1-git-send-email-sachin.kamat@linaro.org> References: <1341218932-15846-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlsB7T3rvl1nr0JIUkmUdL8r8k9zivCs5Ut95ZjwrhWX6PFS2fhkS9Waauu9KufIOB8zRL7 From: Tushar Behera Commit 350f2f4dad64 ("[media] v4l: s5p-tv: hdmi: add support for platform data") makes the presence of platform data mandatory for s5p-tv driver. Adding an API to plat-samsung for this purpose. Signed-off-by: Tushar Behera Signed-off-by: Sachin Kamat --- arch/arm/plat-samsung/devs.c | 26 ++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/hdmi.h | 16 ++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 07b5ac6..921ed88 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -32,6 +32,8 @@ #include #include +#include + #include #include #include @@ -759,6 +761,30 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), &s5p_device_i2c_hdmiphy); } + +struct s5p_hdmi_platform_data s5p_hdmi_def_platdata; + +void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, + struct i2c_board_info *mhl_info, int mhl_bus) +{ + struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata; + + if (soc_is_exynos4210() || soc_is_exynos4212() || + soc_is_exynos4412()) + pd->hdmiphy_bus = 8; + else if (soc_is_s5pv210()) + pd->hdmiphy_bus = 3; + else + pd->hdmiphy_bus = 0; + + pd->hdmiphy_info = hdmiphy_info; + pd->mhl_info = mhl_info; + pd->mhl_bus = mhl_bus; + + s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data), + &s5p_device_hdmi); +} + #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */ /* I2S */ diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h new file mode 100644 index 0000000..5dc7347 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/hdmi.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2012 Samsung Electronics Co.Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#ifndef __PLAT_SAMSUNG_HDMI_H +#define __PLAT_SAMSUNG_HDMI_H __FILE__ + +extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, + struct i2c_board_info *mhl_info, int mhl_bus); + +#endif /* __PLAT_SAMSUNG_HDMI_H */